pub struct MessageId(/* private fields */);Expand description
A 128-bit message identifier for deduplication
Implementations§
Source§impl MessageId
impl MessageId
Sourcepub fn from_bytes(bytes: [u8; 16]) -> Self
pub fn from_bytes(bytes: [u8; 16]) -> Self
Create from raw bytes
Sourcepub fn from_content(
origin: NodeId,
timestamp_ms: u64,
payload_hash: u32,
) -> Self
pub fn from_content( origin: NodeId, timestamp_ms: u64, payload_hash: u32, ) -> Self
Create a deterministic ID from content hash
Use this when you need consistent IDs for the same content, e.g., for idempotent operations.
Trait Implementations§
impl Copy for MessageId
impl Eq for MessageId
impl StructuralPartialEq for MessageId
Auto Trait Implementations§
impl Freeze for MessageId
impl RefUnwindSafe for MessageId
impl Send for MessageId
impl Sync for MessageId
impl Unpin for MessageId
impl UnwindSafe for MessageId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.