pub trait Event: Serialize + Send + TryFrom<RecordedEvent> {
    // Required methods
    fn event_type(&self) -> &'static str;
    fn all_event_types() -> Vec<&'static str>;
}
Expand description

Represent event that can be handled by an EventStore

Required Methods§

source

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

Returns a 'static str which defines the event type

This str must be as precise as possible.

source

fn all_event_types() -> Vec<&'static str>

Returns every possible string representations of the event.

Useful to define particular variant types for an enum

Implementors§