StateReporter

Trait StateReporter 

Source
pub trait StateReporter: Send + Sync {
    // Provided methods
    fn begin(&self) { ... }
    fn action(&self, s: &str) { ... }
    fn progress(&self, percent: Option<u8>) { ... }
    fn end(&self, msg: Option<String>) { ... }
}
Expand description

Interface used to implement objects that are reponsible for sending process reports.

Provided Methods§

Source

fn begin(&self)

Called when a ProcCtx has been acquired.

Source

fn action(&self, s: &str)

Called when ProcCtx::action() has been called to set a current action.

Source

fn progress(&self, percent: Option<u8>)

The ProcCtx has progress has been made.

Source

fn end(&self, msg: Option<String>)

Called when the ProcCtx is being dropped.

This method will be called while the process ownership context still exists. If the ProcCtx is used as a resource lock, the application can rely on mutual exclusive access to the resource within this callback.

Implementors§