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
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".