pub struct PlainProgress<W> { /* private fields */ }Expand description
A line-oriented progress sink for logs, pipes, and deterministic tests.
Implementations§
Source§impl<W> PlainProgress<W>
impl<W> PlainProgress<W>
Sourcepub fn new(console: Console, writer: W) -> Self
pub fn new(console: Console, writer: W) -> Self
Creates a line-oriented progress sink using the supplied writer.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Returns the underlying writer after all progress output has completed.
This is primarily useful for deterministic tests with an in-memory buffer.
Trait Implementations§
Source§impl<W: Write + Send> ProgressSink for PlainProgress<W>
impl<W: Write + Send> ProgressSink for PlainProgress<W>
Source§fn start(&self, total: u64, message: &str)
fn start(&self, total: u64, message: &str)
Announces the start of an operation with its expected total work units.
Source§fn advance(&self, _: u64, _: &str)
fn advance(&self, _: u64, _: &str)
Records the current completed work-unit count and an optional status message.
Auto Trait Implementations§
impl<W> !Freeze for PlainProgress<W>
impl<W> RefUnwindSafe for PlainProgress<W>where
Mutex<W>: RefUnwindSafe,
impl<W> Send for PlainProgress<W>
impl<W> Sync for PlainProgress<W>
impl<W> Unpin for PlainProgress<W>
impl<W> UnsafeUnpin for PlainProgress<W>where
Mutex<W>: UnsafeUnpin,
impl<W> UnwindSafe for PlainProgress<W>where
Mutex<W>: UnwindSafe,
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