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]
TR: Into<Option<&'a mut ThreadRng>>,
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
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<Nullable<Uuid4Proxy>> for Uuid4
[src]
type Expression = Bound<Nullable<Uuid4Proxy>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<'expr> AsExpression<Uuid4Proxy> for &'expr Uuid4
[src]
type Expression = Bound<Uuid4Proxy, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<Uuid4Proxy> for Uuid4
[src]
type Expression = Bound<Uuid4Proxy, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
DB: Backend<RawValue = [u8]>,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for Uuid4 where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
__DB: Backend,
Self: FromSql<__ST, __DB>,
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
[src]
pub const FIELDS_NEEDED: usize
[src]
impl Hash for Uuid4
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for Uuid4
[src]
impl Ord for Uuid4
[src]
fn cmp(&self, other: &Uuid4) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Uuid4> for Uuid4
[src]
impl PartialOrd<Uuid4> for Uuid4
[src]
fn partial_cmp(&self, other: &Uuid4) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<__ST, __DB> Queryable<__ST, __DB> for Uuid4 where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
__DB: Backend,
Self: FromSql<__ST, __DB>,
type Row = Self
The Rust type you’d like to map from. Read more
fn build(row: Self::Row) -> Self
[src]
impl Serialize for Uuid4
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
__DB: Backend,
Self: ToSql<Uuid4Proxy, __DB>,
impl<DB> ToSql<Uuid4Proxy, DB> for Uuid4 where
DB: Backend,
String: ToSql<Uuid4Proxy, DB>,
[src]
DB: Backend,
String: ToSql<Uuid4Proxy, DB>,
impl TryFrom<&'_ [u8; 22]> for Uuid4
[src]
type Error = U64Error
The type returned in the event of a conversion error.
fn try_from(value: &[u8; 22]) -> Result<Self, Self::Error>
[src]
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.
fn try_from(value: &[u8]) -> Result<Self, Self::Error>
[src]
impl TryFrom<&'_ str> for Uuid4
[src]
type Error = U64Error
The type returned in the event of a conversion error.
fn try_from(value: &str) -> Result<Self, Self::Error>
[src]
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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
[src]
pub fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
pub fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,