Trait Observer
Source pub trait Observer: Send + Sync {
// Required method
fn on_event(&self, event: &Event);
}
Expand description
Pluggable event sink. Multiple observers can subscribe to a single run.
Called for every event emitted during execution. Implementations
should be cheap and non-blocking — a slow observer slows execution.
Source§Convenience: any Fn(&Event) + Send + Sync is an Observer.