Trait WithStepProgress

Source
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§

Provided Methods§

Source

fn with_humanize(self, humanize: bool) -> Self

Change wether units are converted to human-readable units.

Source

fn with_unit<S: Into<String>>(self, unit: S) -> Self

Change displayed unit.

Source

fn with_max_step(self, max_step: usize) -> Self

Update expected max step.

Source

fn set_max_step(&mut self, max_step: usize)

Update expected max step.

Source

fn max_step(&mut self) -> Option<usize>

Get expected max step.

Source

fn cur_step(&mut self) -> usize

Get current 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.

Implementors§