Struct uuid64rs::Uuid4[][src]

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<'a, TR>(rng: TR) -> Self where
    TR: Into<Option<&'a mut ThreadRng>>, 
[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<'expr> AsExpression<Nullable<Uuid4Proxy>> for &'expr Uuid4[src]

type Expression = Bound<Nullable<Uuid4Proxy>, Self>

The expression being returned

impl AsExpression<Nullable<Uuid4Proxy>> for Uuid4[src]

type Expression = Bound<Nullable<Uuid4Proxy>, Self>

The expression being returned

impl<'expr> AsExpression<Uuid4Proxy> for &'expr Uuid4[src]

type Expression = Bound<Uuid4Proxy, Self>

The expression being returned

impl AsExpression<Uuid4Proxy> for Uuid4[src]

type Expression = Bound<Uuid4Proxy, Self>

The expression being returned

impl Binary for Uuid4[src]

impl Clone 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<DB> FromSql<Uuid4Proxy, DB> for Uuid4 where
    DB: Backend<RawValue = [u8]>, 
[src]

impl<__ST, __DB> FromSqlRow<__ST, __DB> for Uuid4 where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

impl Hash 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<__ST, __DB> Queryable<__ST, __DB> for Uuid4 where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

type Row = Self

The Rust type you’d like to map from. Read more

impl Serialize for Uuid4[src]

impl StructuralEq for Uuid4[src]

impl StructuralPartialEq for Uuid4[src]

impl<__DB> ToSql<Nullable<Uuid4Proxy>, __DB> for Uuid4 where
    __DB: Backend,
    Self: ToSql<Uuid4Proxy, __DB>, 
[src]

impl<DB> ToSql<Uuid4Proxy, DB> for Uuid4 where
    DB: Backend,
    String: ToSql<Uuid4Proxy, DB>, 
[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.

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.

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

impl RefUnwindSafe for Uuid4

impl Send for Uuid4

impl Sync for Uuid4

impl Unpin for Uuid4

impl UnwindSafe for Uuid4

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> IntoSql for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,