Struct persist_es::SerializedEvent [−][src]
pub struct SerializedEvent {
pub aggregate_id: String,
pub sequence: usize,
pub aggregate_type: String,
pub event_type: String,
pub event_version: String,
pub payload: Value,
pub metadata: Value,
}
Expand description
A serialized version of an event with metadata. Used by repositories to store and load events from a database.
Fields
aggregate_id: String
The id of the aggregate instance.
sequence: usize
The sequence number of the event for this aggregate instance.
aggregate_type: String
The type of aggregate the event applies to.
event_type: String
The type of event that is serialized.
event_version: String
The version of event that is serialized.
payload: Value
The serialized domain event.
metadata: Value
Additional metadata, serialized from a HashMap<String,String>.
Implementations
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Error = PersistenceError
type Error = PersistenceError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = PersistenceError
type Error = PersistenceError
The type returned in the event of a conversion error.
Performs the conversion.