pub trait ProgressMonitor<W: Work>: Debug + Display {
// Required methods
fn worked<A: Into<W>>(&mut self, amount_of_work: A);
fn total(&self) -> &W;
fn completed(&self) -> &W;
fn remaining(&self) -> Cow<'_, W>;
fn close(&mut self) -> Result<(), CloseError>;
}
Expand description
A ProgressMonitor tracks an amount of work which must be completed.
Required Methods§
fn worked<A: Into<W>>(&mut self, amount_of_work: A)
fn total(&self) -> &W
fn completed(&self) -> &W
fn remaining(&self) -> Cow<'_, W>
Sourcefn close(&mut self) -> Result<(), CloseError>
fn close(&mut self) -> Result<(), CloseError>
If you are done with your work, close this monitor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.