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