Skip to main content

ProgressReporter

Trait ProgressReporter 

Source
pub trait ProgressReporter: Send + Sync {
    // Required method
    fn report(&self, event: ProgressEvent);
}
Expand description

Receives progress events from a pull or download operation.

Implementations must be Send + Sync so they can be shared across async tasks. All methods take &self so that the reporter can be held behind an Arc without requiring interior mutability beyond what the implementation itself manages (typically a Mutex).

Required Methods§

Source

fn report(&self, event: ProgressEvent)

Handle a single progress event.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§