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