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: StripeBlockingClient>(
self,
client: &C,
) -> Result<Vec<T::Data>, C::Err>
pub fn get_all<C: StripeBlockingClient>( self, client: &C, ) -> Result<Vec<T::Data>, C::Err>
Repeatedly queries Stripe for more data until all elements in list are fetched, using Stripe’s default page size.
§Errors
If any pagination request returns an error.
Sourcepub fn stream<C: StripeClient + Clone>(
self,
client: &C,
) -> impl Stream<Item = Result<T::Data, C::Err>> + Unpin
pub fn stream<C: StripeClient + 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 Stripe for more data until all elements in list are fetched, using the page size specified in params, or Stripe’s default page size if none is specified.
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