pub struct Persisted<SourceId, T> { /* private fields */ }Expand description
An Event wrapper for events that have been
successfully committed to the EventStore.
EventStreams are composed of these events.
Implementations§
Source§impl<SourceId, T> Persisted<SourceId, T>
impl<SourceId, T> Persisted<SourceId, T>
Sourcepub fn from(source_id: SourceId, event: T) -> EventBuilder<SourceId, T>
pub fn from(source_id: SourceId, event: T) -> EventBuilder<SourceId, T>
Creates a new EventBuilder from the provided Event value.
Sourcepub fn sequence_number(&self) -> u32
pub fn sequence_number(&self) -> u32
Returns the event sequence number.
Trait Implementations§
impl<SourceId: Eq, T: Eq> Eq for Persisted<SourceId, T>
impl<SourceId, T> StructuralPartialEq for Persisted<SourceId, T>
Auto Trait Implementations§
impl<SourceId, T> Freeze for Persisted<SourceId, T>
impl<SourceId, T> RefUnwindSafe for Persisted<SourceId, T>where
SourceId: RefUnwindSafe,
T: RefUnwindSafe,
impl<SourceId, T> Send for Persisted<SourceId, T>
impl<SourceId, T> Sync for Persisted<SourceId, T>
impl<SourceId, T> Unpin for Persisted<SourceId, T>
impl<SourceId, T> UnwindSafe for Persisted<SourceId, T>where
SourceId: UnwindSafe,
T: 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