pub struct ListPaginator<T> { /* private fields */ }
Expand description
Stream designed to support pagination.
Implementations§
Source§impl<T> ListPaginator<T>
impl<T> ListPaginator<T>
Sourcepub fn get_all<C: BlockingClient>(
self,
client: &C,
) -> Result<Vec<T::Data>, C::Err>
pub fn get_all<C: BlockingClient>( self, client: &C, ) -> Result<Vec<T::Data>, C::Err>
Repeatedly queries for more data until all elements in list are fetched, using
§Errors
If any pagination request returns an error.
Sourcepub fn stream<C: PayjpClient + Clone>(
self,
client: &C,
) -> impl Stream<Item = Result<T::Data, C::Err>> + Unpin
pub fn stream<C: PayjpClient + Clone>( self, client: &C, ) -> impl Stream<Item = Result<T::Data, C::Err>> + Unpin
Get all values in this List, consuming self and lazily paginating until all values are fetched.
This function repeatedly queries for more data until all elements in list are fetched.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ListPaginator<T>where
T: Freeze,
impl<T> RefUnwindSafe for ListPaginator<T>where
T: RefUnwindSafe,
impl<T> Send for ListPaginator<T>where
T: Send,
impl<T> Sync for ListPaginator<T>where
T: Sync,
impl<T> Unpin for ListPaginator<T>where
T: Unpin,
impl<T> UnwindSafe for ListPaginator<T>where
T: 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