Struct evident::event::finalized::FinalizedEvent
source · pub struct FinalizedEvent<K: Id> {
pub event_id: K,
pub entry_id: Uuid,
}
Expand description
The FinalizedEvent
is returned once a event is captured using finalize()
.
It stores only the event and entry IDs to prevent unnecessarry resource cloning.
Fields§
§event_id: K
§entry_id: Uuid
The ID of the associated EventEntry
.
Implementations§
source§impl<K: Id> FinalizedEvent<K>
impl<K: Id> FinalizedEvent<K>
sourcepub fn new(event_id: K, entry_id: Uuid) -> Self
pub fn new(event_id: K, entry_id: Uuid) -> Self
Creates a new FinalizedEvent
.
sourcepub fn into_event_id(self) -> K
pub fn into_event_id(self) -> K
Converts this FinalizedEvent
into the associated event Id
.
sourcepub fn get_event_id(&self) -> &K
pub fn get_event_id(&self) -> &K
Returns the associated event `Id.
sourcepub fn get_entry_id(&self) -> &Uuid
pub fn get_entry_id(&self) -> &Uuid
Returns the associated EventEntry
ID.
Trait Implementations§
source§impl<K: Clone + Id> Clone for FinalizedEvent<K>
impl<K: Clone + Id> Clone for FinalizedEvent<K>
source§fn clone(&self) -> FinalizedEvent<K>
fn clone(&self) -> FinalizedEvent<K>
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 moresource§impl<K: Default + Id> Default for FinalizedEvent<K>
impl<K: Default + Id> Default for FinalizedEvent<K>
source§fn default() -> FinalizedEvent<K>
fn default() -> FinalizedEvent<K>
Returns the “default value” for a type. Read more
source§impl<K: PartialEq + Id> PartialEq<FinalizedEvent<K>> for FinalizedEvent<K>
impl<K: PartialEq + Id> PartialEq<FinalizedEvent<K>> for FinalizedEvent<K>
source§fn eq(&self, other: &FinalizedEvent<K>) -> bool
fn eq(&self, other: &FinalizedEvent<K>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<K: Eq + Id> Eq for FinalizedEvent<K>
impl<K: Id> StructuralEq for FinalizedEvent<K>
impl<K: Id> StructuralPartialEq for FinalizedEvent<K>
Auto Trait Implementations§
impl<K> RefUnwindSafe for FinalizedEvent<K>where K: RefUnwindSafe,
impl<K> Send for FinalizedEvent<K>
impl<K> Sync for FinalizedEvent<K>
impl<K> Unpin for FinalizedEvent<K>where K: Unpin,
impl<K> UnwindSafe for FinalizedEvent<K>where K: 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