Skip to main content

EventHandler

Type Alias EventHandler 

Source
pub type EventHandler = Box<dyn Fn(&EventArgs) -> EventResult + Send + Sync>;
Expand description

Event handler function type

Handlers are called when events are dispatched. They receive event arguments and return a result indicating how to proceed with event processing.

Handlers must be Send + Sync to allow safe concurrent access across threads.

Aliased Typeยง

pub struct EventHandler(/* private fields */);