pub trait ProgressRenderer: Send + Sync {
// Required methods
fn on_start(&self, value: usize, max: usize);
fn on_update(&self, value: usize, max: usize);
fn on_finish(&self);
}Expand description
Defines how a progress bar should be rendered
Required Methods§
Sourcefn on_start(&self, value: usize, max: usize)
fn on_start(&self, value: usize, max: usize)
Called when the ProgressBar which holds the instance of Self is spawned
Sourcefn on_update(&self, value: usize, max: usize)
fn on_update(&self, value: usize, max: usize)
Called when the ProgressBar which holds the instance of Self is updated
Sourcefn on_finish(&self)
fn on_finish(&self)
Called when the ProgressBar which holds the instance of Self is dropped
§Notes
Self::on_update() is NOT automatically called before finish, if you would like to update before the renderer is dropped, you can do so when defining this function