pub struct EventId { /* private fields */ }Expand description
The durable identity of one event within a committed command.
Implementations§
Source§impl EventId
impl EventId
Sourcepub const fn new(commit_sequence: CommitSequence, event_ordinal: u32) -> Self
pub const fn new(commit_sequence: CommitSequence, event_ordinal: u32) -> Self
Creates an event identifier from its commit sequence and zero-based ordinal.
Sourcepub const fn from_be_bytes(bytes: [u8; 12]) -> Option<Self>
pub const fn from_be_bytes(bytes: [u8; 12]) -> Option<Self>
Decodes the canonical big-endian representation.
Sourcepub const fn commit_sequence(self) -> CommitSequence
pub const fn commit_sequence(self) -> CommitSequence
Returns the commit containing the event.
Sourcepub const fn event_ordinal(self) -> u32
pub const fn event_ordinal(self) -> u32
Returns the event’s zero-based ordinal within its commit.
Sourcepub const fn to_be_bytes(self) -> [u8; 12]
pub const fn to_be_bytes(self) -> [u8; 12]
Returns the canonical big-endian representation.
Trait Implementations§
impl Copy for EventId
impl Eq for EventId
Source§impl Ord for EventId
impl Ord for EventId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for EventId
impl PartialOrd for EventId
impl StructuralPartialEq for EventId
Auto Trait Implementations§
impl Freeze for EventId
impl RefUnwindSafe for EventId
impl Send for EventId
impl Sync for EventId
impl Unpin for EventId
impl UnsafeUnpin for EventId
impl UnwindSafe for EventId
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