pub trait EventType {
const EVENT_TYPE: &'static str;
// Provided method
fn event_type(&self) -> &'static str { ... }
}
Expand description
A trait for event contents to define their event type.
Required Associated Constants§
Sourceconst EVENT_TYPE: &'static str
const EVENT_TYPE: &'static str
The event type of the event content.
Provided Methods§
Sourcefn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Get the event type of the event content.
Note: This should never be implemented manually, this takes the event type from the constant.
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.