pub struct ProgressBar { /* private fields */ }Expand description
A simple progress bar for terminal output.
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn with_width(self, width: usize) -> Self
pub fn with_width(self, width: usize) -> Self
Set the display width.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set whether the progress bar is enabled.
Sourcepub fn set_message(&mut self, message: impl Into<String>)
pub fn set_message(&mut self, message: impl Into<String>)
Set the message to display.
Sourcepub fn percentage(&self) -> f64
pub fn percentage(&self) -> f64
Get the current progress percentage.
Sourcepub fn finish_with_message(&mut self, message: impl Into<String>)
pub fn finish_with_message(&mut self, message: impl Into<String>)
Finish with a message.
Trait Implementations§
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