pub struct Paginator<T, F> { /* private fields */ }Expand description
Lazily walks every page of a cursor list. Create with
crate::Client::paginate or paginate.
use opensms::ListMessages;
let mut it = client.paginate(|cursor| {
client.messages().list(ListMessages { limit: Some(50), cursor, ..Default::default() })
});
while let Some(message) = it.next().await {
println!("{}", message?.id);
}Implementations§
Auto Trait Implementations§
impl<T, F> Forget for Paginator<T, F>
impl<T, F> Freeze for Paginator<T, F>
impl<T, F> Move for Paginator<T, F>
impl<T, F> RefUnwindSafe for Paginator<T, F>
impl<T, F> Send for Paginator<T, F>
impl<T, F> Sync for Paginator<T, F>
impl<T, F> Unpin for Paginator<T, F>
impl<T, F> UnsafeUnpin for Paginator<T, F>
impl<T, F> UnwindSafe for Paginator<T, F>
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