Skip to main content

ProgressSink

Trait ProgressSink 

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

Receives the ProgressEvents of one Operation.

Called from whichever thread is doing the work, including blocking-pool threads, so it should be cheap and should not block: forward to a channel. Any Fn(ProgressEvent) + Send + Sync closure is a sink.

Required Methods§

Source

fn report(&self, event: ProgressEvent)

Handles one event.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> ProgressSink for F
where F: Fn(ProgressEvent) + Send + Sync,