pub enum PagerResult<P> {
More {
response: P,
continuation: PagerContinuation,
},
Done {
response: P,
},
}Expand description
The result of fetching a single page from a Pager, whether there are more pages or paging is done.
Variants§
More
There are more pages the Pager may fetch using the continuation token.
Fields
§
response: PThe response for the current page.
§
continuation: PagerContinuationContinuation state for the next page.
Done
The Pager is done and there are no additional pages to fetch.
Fields
§
response: PThe response for the current page.
Implementations§
Source§impl<P, F> PagerResult<Response<P, F>>
impl<P, F> PagerResult<Response<P, F>>
Sourcepub fn from_response_header(
response: Response<P, F>,
header_name: &HeaderName,
) -> Self
pub fn from_response_header( response: Response<P, F>, header_name: &HeaderName, ) -> Self
Creates a PagerResult from the provided response, extracting the continuation value from the provided header.
If the provided response has a header with the matching name, this returns PagerResult::More, using the value from the header as the continuation.
If the provided response does not have a header with the matching name, this returns PagerResult::Done.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for PagerResult<P>where
P: Freeze,
impl<P> RefUnwindSafe for PagerResult<P>where
P: RefUnwindSafe,
impl<P> Send for PagerResult<P>where
P: Send,
impl<P> Sync for PagerResult<P>where
P: Sync,
impl<P> Unpin for PagerResult<P>where
P: Unpin,
impl<P> UnsafeUnpin for PagerResult<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for PagerResult<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more