pub trait WithTitle: Sized + Display {
    // Required methods
    fn add_title(&mut self, string: impl AsRef<str>);
    fn update(&mut self);
    fn complete(self);

    // Provided method
    fn with_title(self, string: impl AsRef<str>) -> Self { ... }
}
Expand description

A trait for creating a progress bar or spinner with a title.

Required Methods§

source

fn add_title(&mut self, string: impl AsRef<str>)

Add a title to this indicator.

source

fn update(&mut self)

source

fn complete(self)

Provided Methods§

source

fn with_title(self, string: impl AsRef<str>) -> Self

Add a title to this indicator.

Implementations on Foreign Types§

source§

impl<T> WithTitle for Box<T>where T: WithTitle + ?Sized,

source§

fn add_title(&mut self, string: impl AsRef<str>)

source§

fn update(&mut self)

source§

fn complete(self)

source§

impl WithTitle for !

source§

fn with_title(self, _: impl AsRef<str>) -> Self

source§

fn add_title(&mut self, _: impl AsRef<str>)

source§

fn update(&mut self)

source§

fn complete(self)

Implementors§

source§

impl WithTitle for Silent

source§

impl<T> WithTitle for MaybeSilent<T>where T: WithTitle,

A trait for creating a progress bar or spinner with a title.

source§

impl<T: Write + AsRawFd> WithTitle for Bar<T>

source§

impl<T: Write> WithTitle for Spin<T>