Trait indicatif::style::ProgressTracker
source · pub trait ProgressTracker: Send + Sync {
// Required methods
fn clone_box(&self) -> Box<dyn ProgressTracker>;
fn tick(&mut self, state: &ProgressState, now: Instant);
fn reset(&mut self, state: &ProgressState, now: Instant);
fn write(&self, state: &ProgressState, w: &mut dyn Write);
}
Expand description
Trait for defining stateful or stateless formatters
Required Methods§
sourcefn clone_box(&self) -> Box<dyn ProgressTracker>
fn clone_box(&self) -> Box<dyn ProgressTracker>
Creates a new instance of the progress tracker
sourcefn tick(&mut self, state: &ProgressState, now: Instant)
fn tick(&mut self, state: &ProgressState, now: Instant)
Notifies the progress tracker of a tick event
sourcefn reset(&mut self, state: &ProgressState, now: Instant)
fn reset(&mut self, state: &ProgressState, now: Instant)
Notifies the progress tracker of a reset event
sourcefn write(&self, state: &ProgressState, w: &mut dyn Write)
fn write(&self, state: &ProgressState, w: &mut dyn Write)
Provides access to the progress bar display buffer for custom messages