Trait ProgressBars

Source
pub trait ProgressBars {
    type P: Progress;

    // Required methods
    fn progress_hidden(&self) -> Self::P;
    fn progress_spinner(&self, prefix: impl Into<Cow<'static, str>>) -> Self::P;
    fn progress_counter(&self, prefix: impl Into<Cow<'static, str>>) -> Self::P;
    fn progress_bytes(&self, prefix: impl Into<Cow<'static, str>>) -> Self::P;
}
Expand description

Trait to start progress information report progress information for any rustic action which supports that.

Implement this trait when you want to display this progress to your users.

Required Associated Types§

Source

type P: Progress

The actual type which is able to show the progress

Required Methods§

Source

fn progress_hidden(&self) -> Self::P

Start a new progress, which is hidden

Source

fn progress_spinner(&self, prefix: impl Into<Cow<'static, str>>) -> Self::P

Start a new progress spinner. Note that this progress doesn’t get a length and is not advanced, only finished.

§Arguments
  • prefix - The prefix of the progress
Source

fn progress_counter(&self, prefix: impl Into<Cow<'static, str>>) -> Self::P

Start a new progress which counts something

§Arguments
  • prefix - The prefix of the progress
Source

fn progress_bytes(&self, prefix: impl Into<Cow<'static, str>>) -> Self::P

Start a new progress which counts bytes

§Arguments
  • prefix - The prefix of the progress

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§