[−][src]Struct logbar::Style
Progress bar style
Methods
impl Style
[src]
pub fn new() -> Self
[src]
Default progress bar style
Example
Create a progress bar, explicitly asking for the default style:
let style = logbar::Style::new(); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
pub fn width(self, width: usize) -> Self
[src]
Set the progress bar width in characters
Example
Create a progress bar with a width of 80 characters:
let style = logbar::Style::new().width(80); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
pub fn labels(self, labels: bool) -> Self
[src]
Toggle progress bar labels of the form XX%
Example
Create a progress bar without labels:
let style = logbar::Style::new().labels(false); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
pub fn tick(self, tick: char) -> Self
[src]
Choose a "tick" character separating the progress bar segments
Example
Create a progress bar with '↓' as tick character:
let style = logbar::Style::new().tick('↓'); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
pub fn bar(self, bar: char) -> Self
[src]
Choose a character for the progress bar segments
Example
Create a progress bar made out of '-' characters, separated by the default "tick" character.
let style = logbar::Style::new().bar('-'); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
pub fn indicator(self, indicator: char) -> Self
[src]
Choose a progress indicator
Example
Create a progress bar where the progress is indicated by the number of '█' characters.
let style = logbar::Style::new().indicator('█'); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
Trait Implementations
impl Clone for Style
[src]
fn clone(&self) -> Style
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Style
[src]
fn default() -> Self
[src]
Default progress bar style
Example
Create a progress bar, explicitly asking for the default style:
let style = logbar::Style::default(); let max_progress = 100; let bar = logbar::ProgressBar::with_style(max_progress, style);
impl PartialEq<Style> for Style
[src]
impl PartialOrd<Style> for Style
[src]
fn partial_cmp(&self, other: &Style) -> Option<Ordering>
[src]
fn lt(&self, other: &Style) -> bool
[src]
fn le(&self, other: &Style) -> bool
[src]
fn gt(&self, other: &Style) -> bool
[src]
fn ge(&self, other: &Style) -> bool
[src]
impl Eq for Style
[src]
impl Ord for Style
[src]
fn cmp(&self, other: &Style) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Debug for Style
[src]
impl Hash for Style
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,