pub struct OidStr { /* private fields */ }Expand description
An Object ID
Implementations§
Source§impl OidStr
impl OidStr
Sourcepub fn new_v4<P>(prefix: P) -> Result<Self>
Available on crate feature uuid_v4 only.
pub fn new_v4<P>(prefix: P) -> Result<Self>
uuid_v4 only.Create a new OID with a given Prefix and generating a new UUID
NOTE: The Prefix must be ASCII characters of
A-Z,a-z,0-9(this restriction is arbitrary and could be lifted in the future.
Sourcepub fn new_v7_now<P>(prefix: P) -> Result<Self>
Available on crate feature uuid_v7 only.
pub fn new_v7_now<P>(prefix: P) -> Result<Self>
uuid_v7 only.Create a new OID with a given Prefix and generating a new UUIDv7
(UNIX Epoch based on current system clock)
Sourcepub fn new_v7<P>(prefix: P, ts: Timestamp) -> Result<Self>
Available on crate feature uuid_v7 only.
pub fn new_v7<P>(prefix: P, ts: Timestamp) -> Result<Self>
uuid_v7 only.Create a new OID with a given Prefix and generating a new UUIDv7
(UNIX Epoch based)
Sourcepub fn with_uuid<P>(prefix: P, uuid: Uuid) -> Result<Self>
pub fn with_uuid<P>(prefix: P, uuid: Uuid) -> Result<Self>
Create a new OID with a given Prefix and a given UUID.
NOTE: The Prefix must be ASCII characters of
A-Z,a-z,0-9(this restriction is arbitrary and could be lifted in the future.
Sourcepub fn try_with_uuid<P, S>(prefix: P, uuid: S) -> Result<Self>
pub fn try_with_uuid<P, S>(prefix: P, uuid: S) -> Result<Self>
Create a new OID with a given Prefix and a given string-ish UUID.
NOTE: The Prefix must be ASCII characters of
A-Z,a-z,0-9(this restriction is arbitrary and could be lifted in the future.
Sourcepub fn try_with_uuid_base32<P, S>(prefix: P, base32_uuid: S) -> Result<Self>
pub fn try_with_uuid_base32<P, S>(prefix: P, base32_uuid: S) -> Result<Self>
Attemp to create an Oid from a base32hex encoded UUID string-ish value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OidStr
Available on crate feature serde only.
impl<'de> Deserialize<'de> for OidStr
serde only.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>,
impl Eq for OidStr
impl StructuralPartialEq for OidStr
Auto Trait Implementations§
impl Freeze for OidStr
impl RefUnwindSafe for OidStr
impl Send for OidStr
impl Sync for OidStr
impl Unpin for OidStr
impl UnwindSafe for OidStr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more