pub trait Event:
Send
+ Sync
+ Clone
+ Debug
+ 'static {
// Required method
fn event_type(&self) -> &'static str;
// Provided methods
fn priority(&self) -> EventPriority { ... }
fn persistent(&self) -> bool { ... }
}
Expand description
Event trait that all events must implement
Required Methods§
Sourcefn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Event type identifier
Provided Methods§
Sourcefn priority(&self) -> EventPriority
fn priority(&self) -> EventPriority
Event priority
Sourcefn persistent(&self) -> bool
fn persistent(&self) -> bool
Whether this event should be persisted
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.