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§

source

fn worked<A: Into<W>>(&mut self, amount_of_work: A)

source

fn total(&self) -> &W

source

fn completed(&self) -> &W

source

fn remaining(&self) -> Cow<'_, W>

source

fn close(&mut self) -> Result<(), CloseError>

If you are done with your work, close this monitor.

Implementors§

source§

impl<'n, 'p, W: Work, P: ProgressMonitor<W>> ProgressMonitor<W> for ChildMonitor<'n, 'p, W, P>

source§

impl<'n, W, C> ProgressMonitor<W> for CallbackProgressMonitor<'n, W, C>where W: Work, C: Fn(&W, &W),