[−][src]Struct yyid::Yyid
A yniversally ynique identifier (Yyid).
Methods
impl<'a> Yyid
[src]
pub const fn to_hyphenated_ref(&self) -> HyphenatedRef
[src]
Creates a HyphenatedRef
from a Yyid
pub const fn to_simple_ref(&self) -> SimpleRef
[src]
pub const fn to_urn_ref(&self) -> UrnRef
[src]
impl<'a> Yyid
[src]
pub fn new() -> Self
[src]
Creates a new random YYID
Example
use yyid::Yyid; let yyid = Yyid::new(); println!("{}", yyid); // => "02e7f0f6-067e-8c92-b25c-12c9180540a9"
pub const fn nil() -> Self
[src]
Special case: a "nil" YYID
Example
use yyid::Yyid; let nil = Yyid::nil(); assert_eq!( nil.to_string(), "00000000-0000-0000-0000-000000000000" ); assert_eq!(nil.as_bytes(), &[0u8; 16]);
pub fn is_nil(&self) -> bool
[src]
Tests if the YYID is nil.
pub fn as_bytes(&self) -> &Bytes
[src]
Return an array of 16 octets containing the YYID data
pub fn to_u128(&self) -> u128
[src]
Returns a 128bit value containing the YYID data.
pub fn to_u128_le(&self) -> u128
[src]
Returns a 128bit little-endian value containing the YYID data.
Trait Implementations
impl Clone for Yyid
[src]
impl Copy for Yyid
[src]
impl Debug for Yyid
[src]
impl Default for Yyid
[src]
impl Display for Yyid
[src]
impl Eq for Yyid
[src]
impl Hash for Yyid
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for Yyid
[src]
impl Ord for Yyid
[src]
fn cmp(&self, other: &Yyid) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Yyid> for Yyid
[src]
impl PartialOrd<Yyid> for Yyid
[src]
fn partial_cmp(&self, other: &Yyid) -> Option<Ordering>
[src]
fn lt(&self, other: &Yyid) -> bool
[src]
fn le(&self, other: &Yyid) -> bool
[src]
fn gt(&self, other: &Yyid) -> bool
[src]
fn ge(&self, other: &Yyid) -> bool
[src]
impl StructuralEq for Yyid
[src]
impl StructuralPartialEq for Yyid
[src]
Auto Trait Implementations
impl RefUnwindSafe for Yyid
impl Send for Yyid
impl Sync for Yyid
impl Unpin for Yyid
impl UnwindSafe for Yyid
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,