pub struct MessageId(/* private fields */);Expand description
Unique identifier for a direct message or broadcast.
Client-generated by signing senders (it is inside the signed payload, so PK uniqueness doubles as replay dedup — the ±300s signature freshness window alone would allow replay). Server-generated for OAuth sessions, which have no signature to replay.
Implementations§
Trait Implementations§
impl Copy for MessageId
Source§impl<'de> Deserialize<'de> for MessageId
impl<'de> Deserialize<'de> for MessageId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MessageId
Source§impl From<MessageId> for ModerationTargetId
impl From<MessageId> for ModerationTargetId
Source§impl FromStr for MessageId
Every id round-trips through its own Display.
impl FromStr for MessageId
Every id round-trips through its own Display.
Without this, anything that parses an id from a string — clap
value_parsers, query strings, config files — has to widen the
field back to a bare Uuid at the boundary and convert by
hand, which is the exact laundering the newtype exists to
prevent. agora-cli carried a hand-written
parse_moderation_action_id for precisely this reason.
Source§impl Ord for MessageId
impl Ord for MessageId
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
Source§impl PartialOrd for MessageId
impl PartialOrd 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 UnsafeUnpin 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