pub trait OnEvent: Debug + Downcast {
// Provided method
fn on_event(
&mut self,
_ctx: &mut Context,
event: Box<dyn Event>,
) -> Vec<Box<dyn Event>> { ... }
}pub trait OnEvent: Debug + Downcast {
// Provided method
fn on_event(
&mut self,
_ctx: &mut Context,
event: Box<dyn Event>,
) -> Vec<Box<dyn Event>> { ... }
}