pub struct PaginatedQuery<T> { /* private fields */ }Expand description
Iterator for paginated query results
This allows users to iterate over all results without worrying about pagination:
ⓘ
let mut pages = client.query_paginated::<Account>("SELECT Id FROM Account").await?;
while let Some(batch) = pages.next().await? {
for account in batch {
println!("{:?}", account);
}
}Implementations§
Source§impl<T: DeserializeOwned> PaginatedQuery<T>
impl<T: DeserializeOwned> PaginatedQuery<T>
Sourcepub async fn collect_all(self) -> SfResult<Vec<T>>
pub async fn collect_all(self) -> SfResult<Vec<T>>
Collect all remaining pages into a single vector
Warning: This loads all results into memory. For very large result sets (>100k records), consider processing pages individually.
Auto Trait Implementations§
impl<T> Freeze for PaginatedQuery<T>
impl<T> !RefUnwindSafe for PaginatedQuery<T>
impl<T> Send for PaginatedQuery<T>where
T: Send,
impl<T> Sync for PaginatedQuery<T>where
T: Sync,
impl<T> Unpin for PaginatedQuery<T>where
T: Unpin,
impl<T> !UnwindSafe for PaginatedQuery<T>
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