Struct eventually::event::Persisted
source · pub struct Persisted<Id, Evt>where
Evt: Message,{
pub stream_id: Id,
pub version: Version,
pub event: Envelope<Evt>,
}
Expand description
An [Event] that has been persisted to the Event Store.
Fields§
§stream_id: Id
The id of the Event Stream the persisted Event belongs to.
version: Version
The version of the Event Stream when this Event has been recorded.
This value is used for optimistic concurrency checks, to avoid data races in parallel command evaluations.
Check the Version type and module documentation for more info.
event: Envelope<Evt>
The actual Domain Event carried by this envelope.
Trait Implementations§
source§impl<'de, Id, Evt> Deserialize<'de> for Persisted<Id, Evt>
impl<'de, Id, Evt> Deserialize<'de> for Persisted<Id, Evt>
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<Id: PartialEq, Evt> PartialEq for Persisted<Id, Evt>
impl<Id: PartialEq, Evt> PartialEq for Persisted<Id, Evt>
impl<Id, Evt> StructuralPartialEq for Persisted<Id, Evt>where
Evt: Message,
Auto Trait Implementations§
impl<Id, Evt> RefUnwindSafe for Persisted<Id, Evt>where
Evt: RefUnwindSafe,
Id: RefUnwindSafe,
impl<Id, Evt> Send for Persisted<Id, Evt>
impl<Id, Evt> Sync for Persisted<Id, Evt>
impl<Id, Evt> Unpin for Persisted<Id, Evt>
impl<Id, Evt> UnwindSafe for Persisted<Id, Evt>where
Evt: UnwindSafe,
Id: UnwindSafe,
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