pub trait Observer {
const ENABLED: bool = true;
// Provided method
fn observe(&mut self, event: Event) { ... }
}Expand description
Receives Events while an algorithm runs.
Implemented for () (ignores everything; Observer::ENABLED is false, so the
algorithms skip all event bookkeeping), for &mut O, and for closures through
observer_fn.
Provided Associated Constants§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".