pub trait EventRecord<E> {
// Required methods
fn index(&self) -> u32;
fn recorded_at(&self) -> DateTime<Utc>;
fn idempotency_key(&self) -> Option<String>;
fn event(&self) -> E;
}Expand description
Represents an event read from an EventStore.
Event stores implement this trait directly on their native row/record objects so that they don’t have to allocate and copy the data. An Aggregate will get these passed to its Aggregate::apply method.
Required Methods§
Sourcefn recorded_at(&self) -> DateTime<Utc>
fn recorded_at(&self) -> DateTime<Utc>
Returns the wall-clock time when this event was recorded in the EventStore. This is for informational purposes only since clocks on different service instances using this library could be skewed.
Sourcefn idempotency_key(&self) -> Option<String>
fn idempotency_key(&self) -> Option<String>
Returns the idempotency key that was used (if any) when appending this event to the log.