Skip to main content

EventCallback

Type Alias EventCallback 

Source
pub type EventCallback = Arc<dyn Fn(&MemChangedEvent) + Send + Sync + 'static>;
Expand description

Type alias for the callback shape consumers register. Arc<dyn Fn> keeps the subscriber’s closure cheaply cloneable so the emit path can snapshot the list, release the registry lock, and call into callbacks without re-entering the engine’s mutex.

Aliased Type§

pub struct EventCallback { /* private fields */ }