pub trait Progress {
// Provided methods
fn run_started(&mut self, _total: usize, _url: &str) { ... }
fn device_started(&mut self, _index: usize, _total: usize, _device: &Device) { ... }
fn device_finished(&mut self, _event: &DeviceEvent<'_>) { ... }
fn run_finished(&mut self, _summary: Summary, _elapsed: Duration) { ... }
}Expand description
Events emitted as a run proceeds.
Every method has a default no-op body so an implementor can observe only what it cares about.
Provided Methods§
Sourcefn run_started(&mut self, _total: usize, _url: &str)
fn run_started(&mut self, _total: usize, _url: &str)
Called once, before any device is touched.
Sourcefn device_started(&mut self, _index: usize, _total: usize, _device: &Device)
fn device_started(&mut self, _index: usize, _total: usize, _device: &Device)
Called before each device, with a 1-based index.
Sourcefn device_finished(&mut self, _event: &DeviceEvent<'_>)
fn device_finished(&mut self, _event: &DeviceEvent<'_>)
Called after each device, successful or not.
Sourcefn run_finished(&mut self, _summary: Summary, _elapsed: Duration)
fn run_finished(&mut self, _summary: Summary, _elapsed: Duration)
Called once, after every device.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".