pub trait EventHandler {
// Required method
fn handle(&mut self, ctx: &mut HandlerCtx<'_>) -> Propagation;
}Expand description
A typed event handler attached to a node.
Required Methods§
Sourcefn handle(&mut self, ctx: &mut HandlerCtx<'_>) -> Propagation
fn handle(&mut self, ctx: &mut HandlerCtx<'_>) -> Propagation
Handle ctx.event and return propagation control.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<F> EventHandler for F
Blanket impl so plain closures can be used as handlers.