Struct nson::message_id::MessageId [−][src]
pub struct MessageId { /* fields omitted */ }
Implementations
Generate a new MessageId
Examples
use nson::message_id::MessageId; let id = MessageId::new(); println!("{:?}", id);
Generate an MessageId with bytes
Examples
use nson::message_id::MessageId; let id = MessageId::with_bytes([1, 111, 157, 189, 157, 247, 247, 220, 156, 134, 213, 115]); assert_eq!(format!("{}", id), "016f9dbd9df7f7dc9c86d573")
Generate an MessageId with string. Provided string must be a 12-byte hexadecimal string
Examples
use nson::message_id::MessageId; let id = MessageId::with_string("016f9dbd9df7f7dc9c86d573").unwrap(); assert_eq!(format!("{}", id), "016f9dbd9df7f7dc9c86d573")
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for MessageId
impl UnwindSafe for MessageId
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V