pub struct DbEvent {
pub id: Uuid,
pub aggregate_id: Uuid,
pub payload: Value,
pub occurred_on: DateTime<Utc>,
pub sequence_number: SequenceNumber,
pub version: Option<i32>,
}
Expand description
Event representation on the event store
Fields§
§id: Uuid
§aggregate_id: Uuid
§payload: Value
§occurred_on: DateTime<Utc>
§sequence_number: SequenceNumber
§version: Option<i32>
Implementations§
source§impl DbEvent
impl DbEvent
pub fn try_into_store_event<E, S>(self) -> Result<Option<StoreEvent<E>>, Error>where
S: Schema<E>,
Trait Implementations§
source§impl<'de> Deserialize<'de> for DbEvent
impl<'de> Deserialize<'de> for DbEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, R: Row> FromRow<'a, R> for DbEventwhere
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, R::Database> + Type<R::Database>,
Value: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
SequenceNumber: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for DbEventwhere
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, R::Database> + Type<R::Database>,
Value: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
SequenceNumber: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
source§impl<E: Persistable> TryInto<StoreEvent<E>> for DbEvent
impl<E: Persistable> TryInto<StoreEvent<E>> for DbEvent
Auto Trait Implementations§
impl Freeze for DbEvent
impl RefUnwindSafe for DbEvent
impl Send for DbEvent
impl Sync for DbEvent
impl Unpin for DbEvent
impl UnwindSafe for DbEvent
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more