Trait prog_rs::step_progress::WithStepProgress
source · [−]pub trait WithStepProgress: Sized {
fn get_step_progress(&mut self) -> &mut StepProgress;
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
fn with_humanize(self, humanize: bool) -> Self
fn with_humanize(self, humanize: bool) -> Self
Change wether units are converted to human-readable units.
fn with_max_step(self, max_step: usize) -> Self
fn with_max_step(self, max_step: usize) -> Self
Update expected max step.
fn set_max_step(&mut self, max_step: usize)
fn set_max_step(&mut self, max_step: usize)
Update expected max step.