pub struct Id128<K>(/* private fields */);
Expand description
Authly generic 128-bit identifier
Implementations§
Source§impl<K> Id128<K>
impl<K> Id128<K>
Sourcepub const fn from_uint(val: u128) -> Self
pub const fn from_uint(val: u128) -> Self
Construct a new identifier from a 128-bit unsigned int.
Sourcepub const fn from_raw_array(array: &[u8; 16]) -> Self
pub const fn from_raw_array(array: &[u8; 16]) -> Self
Construct a new identifier from a reference to a byte array, without type information
Sourcepub const fn to_raw_array(self) -> [u8; 16]
pub const fn to_raw_array(self) -> [u8; 16]
Get the byte-wise representation of the ID, without type information
Sourcepub fn from_raw_bytes(bytes: &[u8]) -> Option<Self>
pub fn from_raw_bytes(bytes: &[u8]) -> Option<Self>
Try to deserialize from a raw byte representation, without type information
Trait Implementations§
Source§impl<'de, K: IdKind> Deserialize<'de> for Id128<K>
impl<'de, K: IdKind> Deserialize<'de> for Id128<K>
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
Source§impl<K: IdKind> Id128DynamicArrayConv for Id128<K>
impl<K: IdKind> Id128DynamicArrayConv for Id128<K>
Source§impl<K: IdKind> Id128StaticArrayConv for Id128<K>
impl<K: IdKind> Id128StaticArrayConv for Id128<K>
Source§fn from_array_static(array: &[u8; 16]) -> Self
fn from_array_static(array: &[u8; 16]) -> Self
Convert a byte array into this type.
Source§fn to_array_static(&self) -> [u8; 16]
fn to_array_static(&self) -> [u8; 16]
Convert this type into a byte array.
Source§impl<K> Ord for Id128<K>
impl<K> Ord for Id128<K>
Source§impl<K> PartialOrd for Id128<K>
impl<K> PartialOrd for Id128<K>
impl<K> Copy for Id128<K>
impl<K> Eq for Id128<K>
Auto Trait Implementations§
impl<K> Freeze for Id128<K>
impl<K> RefUnwindSafe for Id128<K>where
K: RefUnwindSafe,
impl<K> Send for Id128<K>where
K: Send,
impl<K> Sync for Id128<K>where
K: Sync,
impl<K> Unpin for Id128<K>where
K: Unpin,
impl<K> UnwindSafe for Id128<K>where
K: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request