pub struct CliProgressRenderer { /* private fields */ }Expand description
A default implementation of a ProgressRenderer meant for CLI applications
Implementations§
Source§impl CliProgressRenderer
impl CliProgressRenderer
pub fn new(bar_width: usize) -> CliProgressRenderer
Sourcepub fn print_above(&self, message: Arguments<'_>)
pub fn print_above(&self, message: Arguments<'_>)
Prints text above the progress bar. Use this instead of println!() when a bar is running
Sourcepub fn set_suffix(&self, suffix: impl AsRef<str>)
pub fn set_suffix(&self, suffix: impl AsRef<str>)
Sets the suffix of the progress bar for when it next updates
Trait Implementations§
Source§impl ProgressRenderer for CliProgressRenderer
impl ProgressRenderer for CliProgressRenderer
Source§fn on_start(&self, value: usize, max: usize)
fn on_start(&self, value: usize, max: usize)
Called when the
crate::ProgressBar which holds the instance of Self is spawnedSource§fn on_update(&self, value: usize, max: usize)
fn on_update(&self, value: usize, max: usize)
Called when the
crate::ProgressBar which holds the instance of Self is updatedAuto Trait Implementations§
impl !Freeze for CliProgressRenderer
impl RefUnwindSafe for CliProgressRenderer
impl Send for CliProgressRenderer
impl Sync for CliProgressRenderer
impl Unpin for CliProgressRenderer
impl UnsafeUnpin for CliProgressRenderer
impl UnwindSafe for CliProgressRenderer
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