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