pub struct ProgressLogger { /* private fields */ }Expand description
Logs progress every N records.
Designed for high-throughput loops where millions of items are processed. The counter is checked against a pre-computed milestone to avoid a division on every call; only when the milestone is reached does the logger perform any formatting or I/O.
Implementations§
Source§impl ProgressLogger
impl ProgressLogger
Sourcepub fn new(name: &'static str, unit: &'static str, every: u64) -> Self
pub fn new(name: &'static str, unit: &'static str, every: u64) -> Self
Creates a new progress logger.
name— log target (appears in[target]in log output)unit— label for items being counted (e.g."reads","records")every— emit a progress line every N items
Auto Trait Implementations§
impl Freeze for ProgressLogger
impl RefUnwindSafe for ProgressLogger
impl Send for ProgressLogger
impl Sync for ProgressLogger
impl Unpin for ProgressLogger
impl UnsafeUnpin for ProgressLogger
impl UnwindSafe for ProgressLogger
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