Trait Event
pub trait Event:
Serialize
+ DeserializeOwned
+ Eq
+ Clone
+ Debug
+ Display
+ 'static
+ Send
+ Sync {
// Required methods
fn is_client(&self) -> bool;
fn is_sync(&self) -> bool;
}Expand description
Event that can change [state][crate::state::State] and emit other events
Note: if it doesn’t implement associative operation over some part of state, then this part of state shouldn’t be changed from outside otherwise data changes can be lost (data race between outside changes and connection changes)
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.