pub trait Handler<E> {
// Required method
fn run(&mut self, world: &mut World, event: E);
// Provided methods
fn inputs_changed(&self, world: &World) -> bool { ... }
fn name(&self) -> &'static str { ... }
}Expand description
Object-safe dispatch trait for event handlers.
Enables Box<dyn Handler<E>> for type-erased heterogeneous dispatch.
Storage and scheduling are the driver’s responsibility — this trait
only defines the dispatch interface.
Takes &mut World — drivers call this directly in their poll loop.
Required Methods§
Provided Methods§
Sourcefn inputs_changed(&self, world: &World) -> bool
fn inputs_changed(&self, world: &World) -> bool
Returns true if any input resource was modified this sequence.
Default returns true (always run). Callback overrides
by checking its state via SystemParam::any_changed.