pub trait Eventable: Unpin + Send + Sync + 'static {
    fn data(&self) -> &str;

    fn event_type(&self) -> Option<&str> { ... }
    fn id(&self) -> Option<&str> { ... }
}
Expand description

A trait that allows any Unpin + Send + Sync type to act as an event.

For a concrete implementation of this trait, you can use Event, but it is also implemented for String and [&'static str].

Required Methods

return the data for this event. non-optional.

Provided Methods

return the event type, optionally

return a unique event id, optionally

Implementations on Foreign Types

Implementors