pub trait Display {
    // Required methods
    fn refresh(&self);
    fn blank(&self);
    fn get_title(&self) -> &str;
    fn set_title(&mut self, from: &str);
    fn update_dimensions(&mut self, to: usize);

    // Provided methods
    fn println(&self, string: &str) { ... }
    fn eprintln(&self, string: &str) { ... }
}
Expand description

A trait for all bars’ displaying

Required Methods§

source

fn refresh(&self)

Refresh the display

source

fn blank(&self)

Blank the display

source

fn get_title(&self) -> &str

Get the title for this display

source

fn set_title(&mut self, from: &str)

Set the title for this display

source

fn update_dimensions(&mut self, to: usize)

Update the max size if needed

Provided Methods§

source

fn println(&self, string: &str)

Blank then print a line, and redisplay.

source

fn eprintln(&self, string: &str)

Blank then print a line std stderr, and redisplay.

Implementations on Foreign Types§

source§

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

source§

fn refresh(&self)

source§

fn blank(&self)

source§

fn println(&self, string: &str)

source§

fn eprintln(&self, string: &str)

source§

fn get_title(&self) -> &str

source§

fn set_title(&mut self, from: &str)

source§

fn update_dimensions(&mut self, to: usize)

source§

impl Display for !

source§

fn refresh(&self)

source§

fn blank(&self)

source§

fn println(&self, _: &str)

source§

fn eprintln(&self, _: &str)

source§

fn get_title(&self) -> &str

source§

fn set_title(&mut self, _: &str)

source§

fn update_dimensions(&mut self, _: usize)

Implementors§

source§

impl Display for Silent

source§

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

source§

impl<T: ?Sized + Write + AsRawFd> Display for Bar<T>

source§

impl<T: ?Sized + Write> Display for Spin<T>