pub struct ClientID {
pub id: [u8; 16],
}
Expand description
A one_two_eight identifier.
Fields§
§id: [u8; 16]
The raw bytes for this identifier.
Implementations§
source§impl ClientID
impl ClientID
sourcepub fn from_human_readable(s: &str) -> Option<Self>
pub fn from_human_readable(s: &str) -> Option<Self>
Construct an identifier from its human-readable form.
sourcepub fn human_readable(&self) -> String
pub fn human_readable(&self) -> String
Construct a string corresponding to the human-readable form of this identifier.
sourcepub fn prefix_free_readable(&self) -> String
pub fn prefix_free_readable(&self) -> String
Return the prefix-free encoding of this identifier.
Trait Implementations§
source§impl<'a> FieldPackHelper<'a, message<ClientID>> for ClientID
impl<'a> FieldPackHelper<'a, message<ClientID>> for ClientID
source§fn field_pack_sz(&self, tag: &Tag) -> usize
fn field_pack_sz(&self, tag: &Tag) -> usize
The size of encoding self with tag.
source§fn field_pack(&self, tag: &Tag, out: &mut [u8])
fn field_pack(&self, tag: &Tag, out: &mut [u8])
Pack the tag into the output buffer.
source§impl<'a> FieldUnpackHelper<'a, message<ClientID>> for ClientID
impl<'a> FieldUnpackHelper<'a, message<ClientID>> for ClientID
source§fn merge_field(&mut self, proto: message<ClientID>)
fn merge_field(&mut self, proto: message<ClientID>)
Merge the proto into self.
source§impl Ord for ClientID
impl Ord for ClientID
source§impl Packable for ClientID
impl Packable for ClientID
source§fn pack_sz(&self) -> usize
fn pack_sz(&self) -> usize
pack_sz
returns the number of bytes required to serialize the Packable object.source§fn pack(&self, buf: &mut [u8])
fn pack(&self, buf: &mut [u8])
pack
fills in the buffer out
with the packed binary representation of the Packable
object. The implementor is responsible to ensure that out
is exactly pack_sz()
bytes
and implementations are encouraged to assert this. Read moresource§fn stream<W>(&self, writer: &mut W) -> Result<usize, Error>
fn stream<W>(&self, writer: &mut W) -> Result<usize, Error>
stream
writes the object to the provided writer using the same representation that would
be used in a call to pack
. The implementor is responsible for making sure that the
number of bytes written is exactly equal to the number of required bytes. Read moresource§impl PartialEq for ClientID
impl PartialEq for ClientID
source§impl PartialOrd for ClientID
impl PartialOrd for ClientID
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> Unpackable<'a> for ClientID
impl<'a> Unpackable<'a> for ClientID
impl Copy for ClientID
impl Eq for ClientID
impl<'a> Message<'a> for ClientID
impl StructuralPartialEq for ClientID
Auto Trait Implementations§
impl RefUnwindSafe for ClientID
impl Send for ClientID
impl Sync for ClientID
impl Unpin for ClientID
impl UnwindSafe for ClientID
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