pub struct ProgressBar {
pub total: Option<f64>,
pub completed: f64,
pub width: Option<usize>,
pub complete_char: char,
pub remaining_char: char,
pub pulse: bool,
pub complete_style: Style,
pub remaining_style: Style,
pub pulse_style: Style,
}Expand description
A single progress bar.
Fields§
§total: Option<f64>Total steps (None = indeterminate).
completed: f64Completed steps.
width: Option<usize>Width in characters.
complete_char: charCharacters for completed portion.
remaining_char: charCharacters for remaining portion.
pulse: boolOptional pulse style (for indeterminate).
complete_style: StyleStyle for completed portion.
remaining_style: StyleStyle for remaining portion.
pulse_style: StyleStyle for the pulse cursor.
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn complete_style(self, style: Style) -> Self
pub fn complete_style(self, style: Style) -> Self
Set complete style.
Sourcepub fn remaining_style(self, style: Style) -> Self
pub fn remaining_style(self, style: Style) -> Self
Set remaining style.
Sourcepub fn percentage(&self) -> f64
pub fn percentage(&self) -> f64
Get progress as a fraction (0.0–1.0).
Trait Implementations§
Source§impl Clone for ProgressBar
impl Clone for ProgressBar
Source§fn clone(&self) -> ProgressBar
fn clone(&self) -> ProgressBar
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProgressBar
impl Debug for ProgressBar
Auto Trait Implementations§
impl Freeze for ProgressBar
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin for ProgressBar
impl UnsafeUnpin for ProgressBar
impl UnwindSafe for ProgressBar
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