Struct yyid::YYID [] [src]

pub struct YYID {
    // some 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_simple_string(&self) -> String

Returns the YYID as a string of 32 hexadecimal digits

Example: 2ff0b694960e88a4693a66cff98fc56c

fn to_hyphenated_string(&self) -> String

Returns a string of hexadecimal digits, separated into groups with a hyphen.

Example: 02e7f0f6-067e-8c92-b25c-12c9180540a9

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 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 Copy for YYID
[src]

impl Hash for YYID
[src]

fn hash<S: Hasher>(&self, state: &mut S)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Debug for YYID
[src]

Convert the YYID to a hexadecimal-based string representation wrapped in YYID()

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for YYID
[src]

Convert the YYID to a hexadecimal-based string representation

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

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