pub trait GameEvent:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn event_type(&self) -> &'static str;
fn serialize(&self) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>;
fn as_any(&self) -> &dyn Any;
}
Expand description
Trait for serializable events