Struct chekov::RecordedEvent
pub struct RecordedEvent {
pub event_number: u64,
pub event_uuid: Uuid,
pub stream_uuid: String,
pub stream_version: Option<i64>,
pub causation_id: Option<Uuid>,
pub correlation_id: Option<Uuid>,
pub event_type: String,
pub data: Value,
pub metadata: Option<String>,
pub created_at: DateTime<Utc>,
}
Expand description
A RecordedEvent
represents an Event
which have been append to a Stream
Fields§
§event_number: u64
an incrementing and gapless integer used to order the event in a stream.
event_uuid: Uuid
Unique identifier for this event
stream_uuid: String
The stream identifier for thie event
stream_version: Option<i64>
The stream version when this event was appended
causation_id: Option<Uuid>
a causation_id
defines who caused this event
correlation_id: Option<Uuid>
a correlation_id
correlates multiple events
event_type: String
Human readable event type
data: Value
Payload of this event
metadata: Option<String>
Metadata defined for this event
created_at: DateTime<Utc>
Event time creation
Implementations§
§impl RecordedEvent
impl RecordedEvent
pub fn try_deserialize<'de, T>(&'de self) -> Result<T, RecordedEventError>where
T: Deserialize<'de> + Event,
pub fn try_deserialize<'de, T>(&'de self) -> Result<T, RecordedEventError>where T: Deserialize<'de> + Event,
Trait Implementations§
§impl Clone for RecordedEvent
impl Clone for RecordedEvent
§fn clone(&self) -> RecordedEvent
fn clone(&self) -> RecordedEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for RecordedEvent
impl Debug for RecordedEvent
§impl<'a, R> FromRow<'a, R> for RecordedEventwhere
R: Row,
&'a str: ColumnIndex<R>,
i64: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Uuid: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
String: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Option<i64>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Option<Uuid>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Value: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Option<String>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
DateTime<Utc>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
impl<'a, R> FromRow<'a, R> for RecordedEventwhere R: Row, &'a str: ColumnIndex<R>, i64: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, Uuid: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, String: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, Option<i64>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, Option<Uuid>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, Value: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, Option<String>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>, DateTime<Utc>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
fn from_row(row: &'a R) -> Result<RecordedEvent, Error>
§impl Message for RecordedEvent
impl Message for RecordedEvent
§impl Serialize for RecordedEvent
impl Serialize for RecordedEvent
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for RecordedEvent
impl Send for RecordedEvent
impl Sync for RecordedEvent
impl Unpin for RecordedEvent
impl UnwindSafe for RecordedEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more