MaybeProgress

Trait MaybeProgress 

Source
pub trait MaybeProgress {
    // Required methods
    fn maybe_set_length(&self, len: u64);
    fn maybe_inc(&self, n: u64);
    fn maybe_enable_steady_tick(&self, dur: Duration);
    fn maybe_finish(&self);
    fn maybe_finish_with_message(&self, msg: impl Into<Cow<'static, str>>);
    fn maybe_set_message(&self, msg: impl Into<Cow<'static, str>>);
    fn maybe_set_prefix(&self, prefix: impl Into<Cow<'static, str>>);
    fn maybe_set_position(&self, pos: u64);
    fn maybe_per_sec(&self) -> f64;
}

Required Methods§

Source

fn maybe_set_length(&self, len: u64)

Source

fn maybe_inc(&self, n: u64)

Source

fn maybe_enable_steady_tick(&self, dur: Duration)

Source

fn maybe_finish(&self)

Source

fn maybe_finish_with_message(&self, msg: impl Into<Cow<'static, str>>)

Source

fn maybe_set_message(&self, msg: impl Into<Cow<'static, str>>)

Source

fn maybe_set_prefix(&self, prefix: impl Into<Cow<'static, str>>)

Source

fn maybe_set_position(&self, pos: u64)

Source

fn maybe_per_sec(&self) -> f64

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.

Implementations on Foreign Types§

Source§

impl MaybeProgress for Option<ProgressBar>

Source§

fn maybe_set_length(&self, len: u64)

Source§

fn maybe_inc(&self, n: u64)

Source§

fn maybe_enable_steady_tick(&self, dur: Duration)

Source§

fn maybe_finish(&self)

Source§

fn maybe_finish_with_message(&self, msg: impl Into<Cow<'static, str>>)

Source§

fn maybe_set_message(&self, msg: impl Into<Cow<'static, str>>)

Source§

fn maybe_set_prefix(&self, prefix: impl Into<Cow<'static, str>>)

Source§

fn maybe_set_position(&self, pos: u64)

Source§

fn maybe_per_sec(&self) -> f64

Implementors§