pub trait WithStepProgress: Sized {
// Required method
fn get_step_progress(&mut self) -> &mut StepProgress;
// Provided methods
fn with_humanize(self, humanize: bool) -> Self { ... }
fn with_unit<S: Into<String>>(self, unit: S) -> Self { ... }
fn with_max_step(self, max_step: usize) -> Self { ... }
fn set_max_step(&mut self, max_step: usize) { ... }
fn max_step(&mut self) -> Option<usize> { ... }
fn cur_step(&mut self) -> usize { ... }
}
Expand description
A type that contains a progress bar that can only step forward.
Note that this trait auto-implements WithProgress.
Required Methods§
fn get_step_progress(&mut self) -> &mut StepProgress
Provided Methods§
Sourcefn with_humanize(self, humanize: bool) -> Self
fn with_humanize(self, humanize: bool) -> Self
Change wether units are converted to human-readable units.
Sourcefn with_max_step(self, max_step: usize) -> Self
fn with_max_step(self, max_step: usize) -> Self
Update expected max step.
Sourcefn set_max_step(&mut self, max_step: usize)
fn set_max_step(&mut self, max_step: usize)
Update expected max step.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.