Struct yyid::YYID
[−]
[src]
pub struct YYID { /* fields omitted */ }
Methods
impl YYID
[src]
fn new() -> YYID
Creates a new random YYID
fn as_bytes<'a>(&'a self) -> &'a [u8]
Return an array of 16 octets containing the YYID data
fn to_string(&self) -> String
Returns a string of hexadecimal digits, separated into groups with a hyphen.
Example: 02e7f0f6-067e-8c92-b25c-12c9180540a9
fn to_simple_string(&self) -> String
Returns the YYID as a string of 32 hexadecimal digits
Example: 2ff0b694960e88a4693a66cff98fc56c
fn to_urn_string(&self) -> String
Returns the YYID formatted as a full URN string
This is the same as the hyphenated format, but with the "urn:yyid:" prefix.
Example: urn:yyid:05f7d6d3-1727-ce2d-6cf2-3b73ad48ff73
Trait Implementations
impl Copy for YYID
[src]
impl Clone for YYID
[src]
fn clone(&self) -> YYID
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for YYID
[src]
Convert the YYID to a hexadecimal-based string representation wrapped in YYID()
impl Display for YYID
[src]
Convert the YYID to a hexadecimal-based string representation
impl PartialEq for YYID
[src]
Test two YYIDs for equality
YYIDs are equal only when they are byte-for-byte identical
fn eq(&self, other: &YYID) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Eq for YYID
[src]
impl Rand for YYID
[src]
Generates a random instance of YYID (V4 conformant)
fn rand<R: Rng>(rng: &mut R) -> YYID
Generates a random instance of this type using the specified source of randomness. Read more