pub struct RecordedEvent {
    pub stream_id: String,
    pub id: Uuid,
    pub revision: u64,
    pub event_type: String,
    pub data: Bytes,
    pub metadata: HashMap<String, String>,
    pub custom_metadata: Bytes,
    pub is_json: bool,
    pub position: Position,
}
Expand description

Represents a previously written event.

Fields

stream_id: String

The event stream that events belongs to.

id: Uuid

Unique identifier representing this event.

revision: u64

Number of this event in the stream.

event_type: String

Type of this event.

data: Bytes

Payload of this event.

metadata: HashMap<String, String>

Representing the metadata associated with this event.

custom_metadata: Bytes

Representing the user-defined metadata associated with this event.

is_json: bool

Indicates wheter the content is internally marked as JSON.

position: Position

An event position in the $all stream.

Implementations

Tries to decode this event payload as a JSON object.

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more