Trait Event

Source
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§

Source

fn event_type(&self) -> &'static str

Event type identifier

Provided Methods§

Source

fn priority(&self) -> EventPriority

Event priority

Source

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.

Implementors§