pub trait Reporter {
// Provided methods
fn fetch_start(&self, total: Option<u64>) { ... }
fn fetch_inc(&self, n: u64) { ... }
fn phase(&self, name: &str) { ... }
}Expand description
Observes the progress of an Engine::install_artifact_reported run so a
caller (the CLI) can render download bars and phase spinners without this
crate depending on a UI crate. All methods have no-op defaults; the unit
type () implements it as a fully silent reporter.
Provided Methods§
Sourcefn fetch_start(&self, total: Option<u64>)
fn fetch_start(&self, total: Option<u64>)
The fetch stage is about to begin; total is the artifact’s declared
size in bytes when known (used as the download bar’s length).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl Reporter for ()
Silent reporter: the default when no progress UI is wired in.