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]) -> Ulid
pub const fn from_bytes(bytes: [u8; 16]) -> Ulid
Construct from the canonical 16-byte representation.
Sourcepub const fn from_u128(value: u128) -> Ulid
pub const fn from_u128(value: u128) -> Ulid
Construct deterministically from the canonical unsigned integer form.
Sourcepub const fn try_from_bytes(bytes: &[u8]) -> Result<Ulid, UlidDecodeError>
pub const fn try_from_bytes(bytes: &[u8]) -> Result<Ulid, 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<Ulid, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Ulid, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Ulid
Source§impl NormalizeAuto for Ulid
impl NormalizeAuto for Ulid
fn normalize_self(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl NormalizeCustom for Ulid
impl NormalizeCustom for Ulid
fn normalize_custom(&mut self, _ctx: &mut dyn VisitorContext)
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
Source§impl Serialize for Ulid
impl Serialize for Ulid
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Ulid
Source§impl ValidateAuto for Ulid
impl ValidateAuto for Ulid
fn validate_self(&self, _ctx: &mut dyn VisitorContext)
Source§impl ValidateCustom for Ulid
impl ValidateCustom for Ulid
fn validate_custom(&self, _ctx: &mut dyn VisitorContext)
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
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<T> CustomError for T
impl<T> CustomError for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.impl<T> Normalize for Twhere
T: NormalizeAuto + NormalizeCustom,
Source§impl<T> NormalizeAndValidate for Twhere
T: Visitable,
impl<T> NormalizeAndValidate for Twhere
T: Visitable,
Source§fn normalize_and_validate(self) -> Result<Self, VisitorError>
fn normalize_and_validate(self) -> Result<Self, VisitorError>
Normalize and then validate this application-owned value. Read more