pub struct Ulid(/* private fields */);Expand description
Canonical ULID atom without generation authority.
Implementations§
Source§impl Ulid
impl Ulid
Sourcepub const STORED_SIZE: u32 = 16
pub const STORED_SIZE: u32 = 16
Canonical byte length.
Sourcepub const fn from_bytes(bytes: [u8; 16]) -> Self
pub const fn from_bytes(bytes: [u8; 16]) -> Self
Construct from the canonical 16-byte representation.
Sourcepub const fn from_u128(value: u128) -> Self
pub const fn from_u128(value: u128) -> Self
Construct deterministically from the canonical unsigned integer form.
Sourcepub const fn try_from_bytes(bytes: &[u8]) -> Result<Self, UlidDecodeError>
pub const fn try_from_bytes(bytes: &[u8]) -> Result<Self, UlidDecodeError>
Trait Implementations§
Source§impl CandidType for Ulid
impl CandidType for Ulid
impl Copy for Ulid
Source§impl<'de> Deserialize<'de> for Ulid
impl<'de> Deserialize<'de> for Ulid
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 Ulid
Source§impl Ord for Ulid
impl Ord for Ulid
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 Ulid
impl PartialOrd for Ulid
impl StructuralPartialEq for Ulid
Auto Trait Implementations§
impl Freeze for Ulid
impl RefUnwindSafe for Ulid
impl Send for Ulid
impl Sync for Ulid
impl Unpin for Ulid
impl UnsafeUnpin for Ulid
impl UnwindSafe for Ulid
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