pub struct Stderr { /* private fields */ }Expand description
Indirection for standard error.
Depending on mode, messages are immediately printed to standard error, or buffered in an
internal buffer.
An optional progress string can be used to report temporary progress indication to the user.
It’s always printed as the last lines of the standard error. When the standard error is created
with WriteMode::Buffered, the progress is not saved in the internal buffer.
Implementations§
Source§impl Stderr
impl Stderr
Sourcepub fn new(mode: WriteMode) -> Self
pub fn new(mode: WriteMode) -> Self
Creates a new standard error, buffered or immediate depending on mode.
Sourcepub fn set_progress_bar(&mut self, progress: &str)
pub fn set_progress_bar(&mut self, progress: &str)
Sets the progress bar (only in WriteMode::Immediate mode).
Sourcepub fn clear_progress_bar(&mut self)
pub fn clear_progress_bar(&mut self)
Clears the progress string (only in WriteMode::Immediate mode).
Sourcepub fn set_buffer(&mut self, buffer: String)
pub fn set_buffer(&mut self, buffer: String)
Set the buffered standard error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stderr
impl RefUnwindSafe for Stderr
impl Send for Stderr
impl Sync for Stderr
impl Unpin for Stderr
impl UnwindSafe for Stderr
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