Skip to main content

LifecycleHook

Trait LifecycleHook 

Source
pub trait LifecycleHook: Sync {
    // Required method
    fn observe(&self, event: &LifecycleEvent) -> Result<()>;
}
Expand description

Observer hook for runtime lifecycle transitions.

Required Methods§

Source

fn observe(&self, event: &LifecycleEvent) -> Result<()>

Observe one lifecycle event.

§Errors

Returns an error when the observer cannot record or react to the event.

Implementors§