1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pub trait Display
{
fn refresh(&self);
fn blank(&self);
fn println(&self, string: &str)
{
self.blank();
println!("{}", string);
self.refresh();
}
fn eprintln(&self, string: &str)
{
self.blank();
eprintln!("{}", string);
self.refresh();
}
fn get_title(&self) -> &str;
fn set_title(&mut self, from: &str);
fn update_dimensions(&mut self, to: usize);
}
pub trait ProgressBar: Display
{
fn set_progress(&mut self, value: f64);
fn get_progress(&self) -> f64;
}
pub trait Spinner: Display
{
fn bump(&mut self);
}