pub struct Id128 { /* private fields */ }
Expand description
A 128-bits ID.
Implementations§
Source§impl Id128
impl Id128
Sourcepub fn try_from_slice(bytes: &[u8]) -> Result<Self, SdError>
pub fn try_from_slice(bytes: &[u8]) -> Result<Self, SdError>
Build an Id128
from a slice of bytes.
Sourcepub const fn from_bytes(bytes: Bytes) -> Self
pub const fn from_bytes(bytes: Bytes) -> Self
Build an Id128
from 16 bytes
Sourcepub fn app_specific(&self, app: &Self) -> Result<Self, SdError>
pub fn app_specific(&self, app: &Self) -> Result<Self, SdError>
Hash this ID with an application-specific ID.
Sourcepub fn lower_hex(&self) -> String
pub fn lower_hex(&self) -> String
Return this ID as a lowercase hexadecimal string, without dashes.
Sourcepub fn dashed_hex(&self) -> String
pub fn dashed_hex(&self) -> String
Return this ID as a lowercase hexadecimal string, with dashes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Id128
impl<'de> Deserialize<'de> for Id128
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 Copy for Id128
impl Eq for Id128
impl StructuralPartialEq for Id128
Auto Trait Implementations§
impl Freeze for Id128
impl RefUnwindSafe for Id128
impl Send for Id128
impl Sync for Id128
impl Unpin for Id128
impl UnwindSafe for Id128
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