Trait event_store_core::event::Event
source · 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§
sourcefn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Returns a 'static str
which defines the event type
This str
must be as precise as possible.
sourcefn all_event_types() -> Vec<&'static str>
fn all_event_types() -> Vec<&'static str>
Returns every possible string representations of the event.
Useful to define particular variant types for an enum