pub struct BatchProcessor { /* private fields */ }Expand description
Processes items in configurable batch sizes with progress tracking.
Implementations§
Source§impl BatchProcessor
impl BatchProcessor
pub fn new(batch_size: usize, total_items: usize) -> Self
pub fn batch_count(&self) -> usize
pub fn current_batch(&self) -> usize
pub fn batch_range(&self, batch_idx: usize) -> (usize, usize)
pub fn advance_batch(&mut self, success_count: usize, fail_count: usize)
pub fn is_complete(&self) -> bool
pub fn progress(&self) -> f32
pub fn remaining(&self) -> usize
pub fn processed(&self) -> usize
pub fn failed(&self) -> usize
pub fn total_items(&self) -> usize
pub fn batch_size(&self) -> usize
pub fn success_rate(&self) -> f32
pub fn reset(&mut self)
Trait Implementations§
Source§impl Clone for BatchProcessor
impl Clone for BatchProcessor
Source§fn clone(&self) -> BatchProcessor
fn clone(&self) -> BatchProcessor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchProcessor
impl RefUnwindSafe for BatchProcessor
impl Send for BatchProcessor
impl Sync for BatchProcessor
impl Unpin for BatchProcessor
impl UnsafeUnpin for BatchProcessor
impl UnwindSafe for BatchProcessor
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