[][src]Struct uuid64rs::Uuid4

pub struct Uuid4(_);

Minimum structure for implementing core trait.

It implements a lot of From and TryFrom traits to allow easy interfacing with most any code and easy conversions between formats.

Implementations

impl Uuid4[src]

pub fn new(rng: Option<Box<dyn RngCore>>) -> Self[src]

Construct a new random instance.

Arguments

  • rng - Optional random number generator to save startup overhead when generating lots of new UUIDs or other custom needs.

Trait Implementations

impl Binary for Uuid4[src]

impl Debug for Uuid4[src]

impl Default for Uuid4[src]

impl<'de> Deserialize<'de> for Uuid4[src]

impl Eq for Uuid4[src]

impl<'_> From<&'_ [u8; 16]> for Uuid4[src]

impl From<u128> for Uuid4[src]

impl LowerHex for Uuid4[src]

impl Ord for Uuid4[src]

impl PartialEq<Uuid4> for Uuid4[src]

impl PartialOrd<Uuid4> for Uuid4[src]

impl StructuralEq for Uuid4[src]

impl StructuralPartialEq for Uuid4[src]

impl<'_> TryFrom<&'_ [u8; 22]> for Uuid4[src]

type Error = U64Error

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ [u8; 32]> for Uuid4[src]

type Error = U64Error

The type returned in the event of a conversion error.

pub fn try_from(value: &[u8; 32]) -> Result<Self, Self::Error>[src]

Converts an utf-8 hexadecimal byte array into a uuid4 value.

NOTE: This function does NOT do any additional validating above what Rust needs to parse the bytes as a hexadecimal string.

impl<'_> TryFrom<&'_ [u8; 36]> for Uuid4[src]

type Error = U64Error

The type returned in the event of a conversion error.

pub fn try_from(value: &[u8; 36]) -> Result<Self, Self::Error>[src]

Converts an utf-8 hexadecimal byte array into a uuid4 value.

the first 4 '-' characters found in the value will be removed.

NOTE: This function does NOT do any additional validating above what Rust needs to parse the bytes as a hexadecimal string.

impl<'_> TryFrom<&'_ [u8]> for Uuid4[src]

type Error = U64Error

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ str> for Uuid4[src]

type Error = U64Error

The type returned in the event of a conversion error.

impl UpperHex for Uuid4[src]

impl Uuid for Uuid4[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,