Struct mini_functions::uuid::UUID

source ·
#[non_exhaustive]
pub struct UUID { /* private fields */ }
Expand description

Implements UUID to generate a new UUID (Universally Unique Identifier) in version 3, 4, or 5.

Arguments

  • version - The version of the UUID to generate. Must be 3, 4, or 5.
  • ns - The namespace to use for the UUID. Must be a valid UUID.
  • name - The name to use for the UUID.

Implementations§

Generates a new UUID (Universally Unique Identifier) in version 3, 4, or 5.

Arguments
  • version - The version of the UUID to generate. Must be 3, 4, or 5.
  • ns - The namespace to use for the UUID. Must be a valid UUID.
  • name - The name to use for the UUID.

Create a new v3 UUID

Arguments
  • ns - The namespace to use for the UUID. Must be a valid UUID.
  • name - The name to use for the UUID.

Create a new v4 UUID

Create a new v5 UUID

Arguments
  • ns - The namespace to use for the UUID. Must be a valid UUID.
  • name - The name to use for the UUID.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

This implementation of the fmt::Display trait allows instances of UUID to be printed using the {} formatting placeholder. The write! macro is used to write the string representation of self.inner to the provided fmt::Formatter. The fmt::Result type is returned to indicate whether the operation was successful or not.

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.