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

Create a new SerializedEvent with the given values.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.