pub trait AnyEventListener: Send + Sync {
// Required methods
fn handle_event(&self, event: &dyn Event) -> bool;
fn event_type_id(&self) -> TypeId;
}Expand description
Type-erased event listener
This allows storing listeners of different event types in the same collection.
Required Methods§
Sourcefn handle_event(&self, event: &dyn Event) -> bool
fn handle_event(&self, event: &dyn Event) -> bool
Sourcefn event_type_id(&self) -> TypeId
fn event_type_id(&self) -> TypeId
Returns the TypeId of the event type this listener handles