pub struct Style {
pub value_display: ValueDisplay,
pub value_suffix: Option<&'static str>,
pub value_divisor: usize,
pub left_cap: Symbol,
pub right_cap: Symbol,
pub empty_char: Symbol,
pub done_char: Symbol,
pub fill_chars: Vec<Symbol>,
}Fields§
§value_display: ValueDisplay§value_suffix: Option<&'static str>§value_divisor: usize§left_cap: Symbol§right_cap: Symbol§empty_char: Symbol§done_char: Symbol§fill_chars: Vec<Symbol>Implementations§
Source§impl Style
impl Style
Sourcepub fn default_ascii() -> Style
pub fn default_ascii() -> Style
Examples found in repository?
examples/simple.rs (line 7)
5fn main()
6{
7 let mut style = Style::default_ascii();
8 style.value_display = ValueDisplay::Percentage;
9 let mut pb = Progresso::new(style);
10
11 pb.set_total(400);
12 for i in 0..401 {
13 pb.erase();
14 pb.set_value(i);
15 pb.draw();
16 thread::sleep(std::time::Duration::from_millis(25));
17 }
18}Sourcepub fn new_smooth_unicode() -> Style
pub fn new_smooth_unicode() -> Style
Examples found in repository?
examples/simple_block.rs (line 7)
5fn main()
6{
7 let mut style = Style::new_smooth_unicode();
8 style.value_display = ValueDisplay::Percentage;
9 let mut pb = Progresso::new(style);
10
11 pb.set_total(400);
12 for i in 0..401 {
13 pb.erase();
14 pb.set_value(i);
15 pb.draw();
16 thread::sleep(std::time::Duration::from_millis(5));
17 }
18
19 let mut style = Style::new_climbing_blocks_unicode();
20 style.value_display = ValueDisplay::Percentage;
21 let mut pb = Progresso::new(style);
22
23 pb.set_total(400);
24 for i in 0..401 {
25 pb.erase();
26 pb.set_value(i);
27 pb.draw();
28 thread::sleep(std::time::Duration::from_millis(50));
29 }
30}Sourcepub fn new_climbing_blocks_unicode() -> Style
pub fn new_climbing_blocks_unicode() -> Style
Examples found in repository?
examples/simple_block.rs (line 19)
5fn main()
6{
7 let mut style = Style::new_smooth_unicode();
8 style.value_display = ValueDisplay::Percentage;
9 let mut pb = Progresso::new(style);
10
11 pb.set_total(400);
12 for i in 0..401 {
13 pb.erase();
14 pb.set_value(i);
15 pb.draw();
16 thread::sleep(std::time::Duration::from_millis(5));
17 }
18
19 let mut style = Style::new_climbing_blocks_unicode();
20 style.value_display = ValueDisplay::Percentage;
21 let mut pb = Progresso::new(style);
22
23 pb.set_total(400);
24 for i in 0..401 {
25 pb.erase();
26 pb.set_value(i);
27 pb.draw();
28 thread::sleep(std::time::Duration::from_millis(50));
29 }
30}Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more