Skip to main content

ProgressReporter

Trait ProgressReporter 

Source
pub trait ProgressReporter: Send + Sync {
    // Required methods
    fn update(&self, message: &str, current: Option<u64>, total: Option<u64>);
    fn finish(&self, message: &str);

    // Provided method
    fn pause(&self) -> Box<dyn PauseGuard + '_> { ... }
}

Required Methods§

Source

fn update(&self, message: &str, current: Option<u64>, total: Option<u64>)

Source

fn finish(&self, message: &str)

Provided Methods§

Source

fn pause(&self) -> Box<dyn PauseGuard + '_>

Hide our own spinner/bars while a child process draws to the terminal. Implementations should clear their lines until the returned guard is dropped. The default is a no-op for reporters that don’t draw to a TTY.

Implementors§