Skip to main content

StudyObserver

Trait StudyObserver 

pub trait StudyObserver: Send + Sync {
    // Required method
    fn on_event(&self, event: &StudyEvent);
}
Expand description

Receives typed study lifecycle events.

Implementations must return quickly and should not panic. Delivery is synchronous with the operation that emits it. Parallel operations and separate handles may invoke an observer concurrently. Panics are caught when unwinding is available and never become study errors.

Required Methods§

fn on_event(&self, event: &StudyEvent)

Handles one committed lifecycle event.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§