Skip to main content

Progress

Trait Progress 

Source
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§

Source

fn run_started(&mut self, _total: usize, _url: &str)

Called once, before any device is touched.

Source

fn device_started(&mut self, _index: usize, _total: usize, _device: &Device)

Called before each device, with a 1-based index.

Source

fn device_finished(&mut self, _event: &DeviceEvent<'_>)

Called after each device, successful or not.

Source

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".

Implementors§