pub struct EnhancedCollectionIterator<'a, T> { /* private fields */ }
Expand description
Enhanced collection iterator with rate limiting and progress tracking
Implementations§
Source§impl<'a, T> EnhancedCollectionIterator<'a, T>where
T: DeserializeOwned + Clone,
Constructor methods for EnhancedCollectionIterator
impl<'a, T> EnhancedCollectionIterator<'a, T>where
T: DeserializeOwned + Clone,
Constructor methods for EnhancedCollectionIterator
Source§impl<'a, T> EnhancedCollectionIterator<'a, T>where
T: DeserializeOwned + Clone,
Builder pattern methods for EnhancedCollectionIterator
impl<'a, T> EnhancedCollectionIterator<'a, T>where
T: DeserializeOwned + Clone,
Builder pattern methods for EnhancedCollectionIterator
Sourcepub fn with_limit(self, limit: u32) -> Self
pub fn with_limit(self, limit: u32) -> Self
Set batch size limit
Sourcepub fn with_rate_limiter(self, limiter: Arc<TokenBucketLimiter>) -> Self
pub fn with_rate_limiter(self, limiter: Arc<TokenBucketLimiter>) -> Self
Set custom rate limiter
Source§impl<'a, T> EnhancedCollectionIterator<'a, T>where
T: DeserializeOwned + Clone,
Accessor methods for EnhancedCollectionIterator
impl<'a, T> EnhancedCollectionIterator<'a, T>where
T: DeserializeOwned + Clone,
Accessor methods for EnhancedCollectionIterator
Sourcepub fn total_fetched(&self) -> u64
pub fn total_fetched(&self) -> u64
Get total items fetched so far
Sourcepub fn batch_count(&self) -> u32
pub fn batch_count(&self) -> u32
Get number of batches fetched
Trait Implementations§
Source§impl<'a, T> PaginatedIterator<T> for EnhancedCollectionIterator<'a, T>
impl<'a, T> PaginatedIterator<T> for EnhancedCollectionIterator<'a, T>
type Error = Error
Source§fn next_batch<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_batch<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the next batch of items
Source§fn hint_remaining(&self) -> Option<usize>
fn hint_remaining(&self) -> Option<usize>
Get an approximation of items remaining if available
Source§fn stats(&self) -> IteratorStats
fn stats(&self) -> IteratorStats
Get statistics about fetching
Auto Trait Implementations§
impl<'a, T> Freeze for EnhancedCollectionIterator<'a, T>
impl<'a, T> !RefUnwindSafe for EnhancedCollectionIterator<'a, T>
impl<'a, T> Send for EnhancedCollectionIterator<'a, T>where
T: Send,
impl<'a, T> Sync for EnhancedCollectionIterator<'a, T>where
T: Sync,
impl<'a, T> Unpin for EnhancedCollectionIterator<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for EnhancedCollectionIterator<'a, 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
Source§impl<I, T> Collectable<T> for I
impl<I, T> Collectable<T> for I
type Error = <I as PaginatedIterator<T>>::Error
Source§fn take<'async_trait>(
self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, <I as Collectable<T>>::Error>> + Send + 'async_trait>>where
I: 'async_trait,
fn take<'async_trait>(
self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, <I as Collectable<T>>::Error>> + Send + 'async_trait>>where
I: 'async_trait,
Take a specific number of items
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<I, T> IteratorExt<T> for Iwhere
T: Send,
I: PaginatedIterator<T>,
impl<I, T> IteratorExt<T> for Iwhere
T: Send,
I: PaginatedIterator<T>,
Source§fn map<U, F>(self, mapper: F) -> MappedIterator<Self, T, U, F>
fn map<U, F>(self, mapper: F) -> MappedIterator<Self, T, U, F>
Map items to a different type
Source§fn filter<F>(self, predicate: F) -> FilteredIterator<Self, T, F>
fn filter<F>(self, predicate: F) -> FilteredIterator<Self, T, F>
Filter items based on a predicate
Source§fn take_until<F>(self, condition: F) -> TakeUntilIterator<Self, T, F>
fn take_until<F>(self, condition: F) -> TakeUntilIterator<Self, T, F>
Take items until a condition is met
Source§fn batch(self, size: usize) -> BatchIterator<Self, T>where
Self: Sized,
fn batch(self, size: usize) -> BatchIterator<Self, T>where
Self: Sized,
Batch items into chunks
Source§fn throttle(self, delay: Duration) -> ThrottledIterator<Self, T>where
Self: Sized,
fn throttle(self, delay: Duration) -> ThrottledIterator<Self, T>where
Self: Sized,
Throttle iteration with delays
Source§fn retry(self, max_retries: u32, base_delay: Duration) -> RetryIterator<Self, T>where
Self: Sized,
fn retry(self, max_retries: u32, base_delay: Duration) -> RetryIterator<Self, T>where
Self: Sized,
Add retry logic to iterations
Source§fn with_progress(self, tracker: ProgressTracker) -> ProgressIterator<Self, T>where
Self: Sized,
fn with_progress(self, tracker: ProgressTracker) -> ProgressIterator<Self, T>where
Self: Sized,
Add progress tracking
Source§fn cached(self) -> CachedIterator<Self, T>where
Self: Sized,
fn cached(self) -> CachedIterator<Self, T>where
Self: Sized,
Cache results for repeated iteration