pub struct ProgressBarStyle { /* private fields */ }Expand description
Used to style a progress bar.
§Example Usage
use progressed::{ProgressBar, ProgressBarStyle};
let style = ProgressBarStyle::default()
    .set_fg_symbol('=')
    .set_show_time(true);
let bar = ProgressBar::new(0..100).set_style(style);§Styles
There a few defaults styles that are modeled after common progress bars.
§Default
(25/50) |######################## | 50%
§Arch
00:00:00 [######––––––––––––––––––––] 12%
§Cargo
[====================================> ]
§Smooth
86% |██████████████████████████████████████▉ | 00:00:02
Implementations§
Source§impl ProgressBarStyle
 
impl ProgressBarStyle
pub fn smooth() -> Self
pub fn arch() -> Self
pub fn cargo() -> Self
pub fn get_fg_symbol(&self) -> char
pub fn set_fg_symbol(self, fg_symbol: char) -> Self
pub fn get_bg_symbol(&self) -> char
pub fn set_bg_symbol(self, bg_symbol: char) -> Self
pub fn get_tip_symbol(&self) -> char
pub fn set_tip_symbol(self, tip_symbol: char) -> Self
pub fn get_is_smooth(&self) -> bool
pub fn set_is_smooth(self, is_smooth: bool) -> Self
pub fn get_show_time(&self) -> bool
pub fn set_show_time(self, show_time: bool) -> Self
pub fn get_show_counter(&self) -> bool
pub fn set_show_counter(self, show_counter: bool) -> Self
pub fn get_show_percentage(&self) -> bool
pub fn set_show_percentage(self, show_percentage: bool) -> Self
pub fn get_counter_surround(&self) -> (char, char)
pub fn set_counter_surround(self, counter_surround: (char, char)) -> Self
pub fn get_bar_surround(&self) -> (char, char)
pub fn set_bar_surround(self, bar_surround: (char, char)) -> Self
pub fn get_layout(&self) -> ProgressBarLayout
pub fn set_layout(self, layout: ProgressBarLayout) -> Self
Trait Implementations§
Source§impl Clone for ProgressBarStyle
 
impl Clone for ProgressBarStyle
Source§fn clone(&self) -> ProgressBarStyle
 
fn clone(&self) -> ProgressBarStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for ProgressBarStyle
 
impl Debug for ProgressBarStyle
Auto Trait Implementations§
impl Freeze for ProgressBarStyle
impl RefUnwindSafe for ProgressBarStyle
impl Send for ProgressBarStyle
impl Sync for ProgressBarStyle
impl Unpin for ProgressBarStyle
impl UnwindSafe for ProgressBarStyle
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