(function() { var type_impls = Object.fromEntries([["meta_srv",[["
Source§

impl AsRef<[u8]> for Uuid

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[u8]>","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl AsRef<Uuid> for Uuid

Source§

fn as_ref(&self) -> &Uuid

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Clone for Uuid

Source§

fn clone(&self) -> Uuid

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Debug for Uuid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Default for Uuid

Source§

fn default() -> Uuid

Returns the “default value” for a type. Read more
","Default","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl<'de> Deserialize<'de> for Uuid

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Uuid, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Display for Uuid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl From<Braced> for Uuid

Source§

fn from(f: Braced) -> Uuid

Converts to this type from the input type.
","From","meta_srv::procedure::repartition::group::GroupId"],["
§

impl From<FileId> for Uuid

§

fn from(value: FileId) -> Uuid

Converts to this type from the input type.
","From","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl From<Hyphenated> for Uuid

Source§

fn from(f: Hyphenated) -> Uuid

Converts to this type from the input type.
","From","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl From<NonNilUuid> for Uuid

Source§

fn from(non_nil: NonNilUuid) -> Uuid

Converts a NonNilUuid back into a Uuid.

\n
§Examples
\n
let uuid = Uuid::from_u128(0x0123456789abcdef0123456789abcdef);\nlet non_nil = NonNilUuid::try_from(uuid).unwrap();\nlet uuid_again = Uuid::from(non_nil);\n\nassert_eq!(uuid, uuid_again);
","From","meta_srv::procedure::repartition::group::GroupId"],["
§

impl From<ParseIr<Uuid>> for Uuid

§

fn from(value: ParseIr<Uuid>) -> Uuid

Converts to this type from the input type.
","From>","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl From<Simple> for Uuid

Source§

fn from(f: Simple) -> Uuid

Converts to this type from the input type.
","From","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl From<Urn> for Uuid

Source§

fn from(f: Urn) -> Uuid

Converts to this type from the input type.
","From","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl FromStr for Uuid

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(uuid_str: &str) -> Result<Uuid, <Uuid as FromStr>::Err>

Parses a string s to return a value of this type. Read more
","FromStr","meta_srv::procedure::repartition::group::GroupId"],["
§

impl FromValue for Uuid

§

type Intermediate = ParseIr<Uuid>

§

fn from_value(v: Value) -> Self

Will panic if could not convert v to Self.
§

fn from_value_opt(v: Value) -> Result<Self, FromValueError>

Will return Err(Error::FromValueError(v)) if could not convert v to Self.
§

fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>

Will return Err(Error::FromValueError(v)) if v is not convertible to Self.
","FromValue","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Hash for Uuid

Source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

Feeds a slice of this type into the given Hasher. Read more
","Hash","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl LowerHex for Uuid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","LowerHex","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Ord for Uuid

Source§

fn cmp(&self, other: &Uuid) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl PartialEq<NonNilUuid> for Uuid

Source§

fn eq(&self, other: &NonNilUuid) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl PartialEq for Uuid

Source§

fn eq(&self, other: &Uuid) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl PartialOrd<NonNilUuid> for Uuid

Source§

fn partial_cmp(&self, other: &NonNilUuid) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl PartialOrd for Uuid

Source§

fn partial_cmp(&self, other: &Uuid) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Serialize for Uuid

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl TryFrom<&str> for Uuid

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(uuid_str: &str) -> Result<Uuid, <Uuid as TryFrom<&str>>::Error>

Performs the conversion.
","TryFrom<&str>","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl TryFrom<String> for Uuid

Available on crate feature std only.
Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(uuid_str: String) -> Result<Uuid, <Uuid as TryFrom<String>>::Error>

Performs the conversion.
","TryFrom","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl TryFrom<Vec<u8>> for Uuid

Available on crate feature std only.
Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vec<u8>) -> Result<Uuid, <Uuid as TryFrom<Vec<u8>>>::Error>

Performs the conversion.
","TryFrom>","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl UpperHex for Uuid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","UpperHex","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Uuid

Source

pub const fn nil() -> Uuid

The ‘nil UUID’ (all zeros).

\n

The nil UUID is a special form of UUID that is specified to have all\n128 bits set to zero.

\n
§References
\n\n
§Examples
\n

Basic usage:

\n\n
let uuid = Uuid::nil();\n\nassert_eq!(\n    \"00000000-0000-0000-0000-000000000000\",\n    uuid.hyphenated().to_string(),\n);
Source

pub const fn max() -> Uuid

The ‘max UUID’ (all ones).

\n

The max UUID is a special form of UUID that is specified to have all\n128 bits set to one.

\n
§References
\n\n
§Examples
\n

Basic usage:

\n\n
let uuid = Uuid::max();\n\nassert_eq!(\n    \"ffffffff-ffff-ffff-ffff-ffffffffffff\",\n    uuid.hyphenated().to_string(),\n);
Source

pub const fn from_fields(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> Uuid

Creates a UUID from four field values.

\n
§Examples
\n

Basic usage:

\n\n
let d1 = 0xa1a2a3a4;\nlet d2 = 0xb1b2;\nlet d3 = 0xc1c2;\nlet d4 = [0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8];\n\nlet uuid = Uuid::from_fields(d1, d2, d3, &d4);\n\nassert_eq!(\n    \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\",\n    uuid.hyphenated().to_string(),\n);
Source

pub const fn from_fields_le(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> Uuid

Creates a UUID from four field values in little-endian order.

\n

The bytes in the d1, d2 and d3 fields will be flipped to convert\ninto big-endian order. This is based on the endianness of the UUID,\nrather than the target environment so bytes will be flipped on both\nbig and little endian machines.

\n
§Examples
\n

Basic usage:

\n\n
let d1 = 0xa1a2a3a4;\nlet d2 = 0xb1b2;\nlet d3 = 0xc1c2;\nlet d4 = [0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8];\n\nlet uuid = Uuid::from_fields_le(d1, d2, d3, &d4);\n\nassert_eq!(\n    \"a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8\",\n    uuid.hyphenated().to_string(),\n);
Source

pub const fn from_u128(v: u128) -> Uuid

Creates a UUID from a 128bit value.

\n
§Examples
\n

Basic usage:

\n\n
let v = 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128;\n\nlet uuid = Uuid::from_u128(v);\n\nassert_eq!(\n    \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\",\n    uuid.hyphenated().to_string(),\n);
Source

pub const fn from_u128_le(v: u128) -> Uuid

Creates a UUID from a 128bit value in little-endian order.

\n

The entire value will be flipped to convert into big-endian order.\nThis is based on the endianness of the UUID, rather than the target\nenvironment so bytes will be flipped on both big and little endian\nmachines.

\n
§Examples
\n

Basic usage:

\n\n
let v = 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128;\n\nlet uuid = Uuid::from_u128_le(v);\n\nassert_eq!(\n    \"d8d7d6d5-d4d3-d2d1-c2c1-b2b1a4a3a2a1\",\n    uuid.hyphenated().to_string(),\n);
Source

pub const fn from_u64_pair(high_bits: u64, low_bits: u64) -> Uuid

Creates a UUID from two 64bit values.

\n
§Examples
\n

Basic usage:

\n\n
let hi = 0xa1a2a3a4b1b2c1c2u64;\nlet lo = 0xd1d2d3d4d5d6d7d8u64;\n\nlet uuid = Uuid::from_u64_pair(hi, lo);\n\nassert_eq!(\n    \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\",\n    uuid.hyphenated().to_string(),\n);
Source

pub fn from_slice(b: &[u8]) -> Result<Uuid, Error>

Creates a UUID using the supplied bytes.

\n
§Errors
\n

This function will return an error if b has any length other than 16.

\n
§Examples
\n

Basic usage:

\n\n
let bytes = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\n\nlet uuid = Uuid::from_slice(&bytes)?;\n\nassert_eq!(\n    \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\",\n    uuid.hyphenated().to_string(),\n);
Source

pub fn from_slice_le(b: &[u8]) -> Result<Uuid, Error>

Creates a UUID using the supplied bytes in little endian order.

\n

The individual fields encoded in the buffer will be flipped.

\n
§Errors
\n

This function will return an error if b has any length other than 16.

\n
§Examples
\n

Basic usage:

\n\n
let bytes = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\n\nlet uuid = Uuid::from_slice_le(&bytes)?;\n\nassert_eq!(\n    uuid.hyphenated().to_string(),\n    \"a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8\"\n);
Source

pub const fn from_bytes(bytes: [u8; 16]) -> Uuid

Creates a UUID using the supplied bytes.

\n
§Examples
\n

Basic usage:

\n\n
let bytes = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\n\nlet uuid = Uuid::from_bytes(bytes);\n\nassert_eq!(\n    uuid.hyphenated().to_string(),\n    \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\"\n);
Source

pub const fn from_bytes_le(b: [u8; 16]) -> Uuid

Creates a UUID using the supplied bytes in little endian order.

\n

Note that ordering is applied to each field, rather than to the bytes as a whole.\nThis ordering is compatible with Microsoft’s mixed endian GUID format.

\n
§Examples
\n

Basic usage:

\n\n
let bytes = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\n\nlet uuid = Uuid::from_bytes_le(bytes);\n\nassert_eq!(\n    \"a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8\",\n    uuid.hyphenated().to_string(),\n);
Source

pub fn from_bytes_ref(bytes: &[u8; 16]) -> &Uuid

Creates a reference to a UUID from a reference to the supplied bytes.

\n
§Examples
\n

Basic usage:

\n\n
let bytes = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\n\nlet uuid = Uuid::from_bytes_ref(&bytes);\n\nassert_eq!(\n    uuid.hyphenated().to_string(),\n    \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\"\n);\n\nassert!(std::ptr::eq(\n    uuid as *const Uuid as *const u8,\n    &bytes as *const [u8; 16] as *const u8,\n));
",0,"meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Uuid

Source

pub const fn hyphenated(self) -> Hyphenated

Get a Hyphenated formatter.

\n
Source

pub fn as_hyphenated(&self) -> &Hyphenated

Get a borrowed Hyphenated formatter.

\n
Source

pub const fn simple(self) -> Simple

Get a Simple formatter.

\n
Source

pub fn as_simple(&self) -> &Simple

Get a borrowed Simple formatter.

\n
Source

pub const fn urn(self) -> Urn

Get a Urn formatter.

\n
Source

pub fn as_urn(&self) -> &Urn

Get a borrowed Urn formatter.

\n
Source

pub const fn braced(self) -> Braced

Get a Braced formatter.

\n
Source

pub fn as_braced(&self) -> &Braced

Get a borrowed Braced formatter.

\n
",0,"meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Uuid

Source

pub const NAMESPACE_DNS: Uuid

UUID namespace for Domain Name System (DNS).

\n
Source

pub const NAMESPACE_OID: Uuid

UUID namespace for ISO Object Identifiers (OIDs).

\n
Source

pub const NAMESPACE_URL: Uuid

UUID namespace for Uniform Resource Locators (URLs).

\n
Source

pub const NAMESPACE_X500: Uuid

UUID namespace for X.500 Distinguished Names (DNs).

\n
Source

pub const fn get_variant(&self) -> Variant

Returns the variant of the UUID structure.

\n

This determines the interpretation of the structure of the UUID.\nThis method simply reads the value of the variant byte. It doesn’t\nvalidate the rest of the UUID as conforming to that variant.

\n
§Examples
\n

Basic usage:

\n\n
let my_uuid = Uuid::parse_str(\"02f09a3f-1624-3b1d-8409-44eff7708208\")?;\n\nassert_eq!(Variant::RFC4122, my_uuid.get_variant());
§References
\n\n
Source

pub const fn get_version_num(&self) -> usize

Returns the version number of the UUID.

\n

This represents the algorithm used to generate the value.\nThis method is the future-proof alternative to Uuid::get_version.

\n
§Examples
\n

Basic usage:

\n\n
let my_uuid = Uuid::parse_str(\"02f09a3f-1624-3b1d-8409-44eff7708208\")?;\n\nassert_eq!(3, my_uuid.get_version_num());
§References
\n\n
Source

pub const fn get_version(&self) -> Option<Version>

Returns the version of the UUID.

\n

This represents the algorithm used to generate the value.\nIf the version field doesn’t contain a recognized version then None\nis returned. If you’re trying to read the version for a future extension\nyou can also use Uuid::get_version_num to unconditionally return a\nnumber. Future extensions may start to return Some once they’re\nstandardized and supported.

\n
§Examples
\n

Basic usage:

\n\n
let my_uuid = Uuid::parse_str(\"02f09a3f-1624-3b1d-8409-44eff7708208\")?;\n\nassert_eq!(Some(Version::Md5), my_uuid.get_version());
§References
\n\n
Source

pub fn as_fields(&self) -> (u32, u16, u16, &[u8; 8])

Returns the four field values of the UUID.

\n

These values can be passed to the Uuid::from_fields method to get\nthe original Uuid back.

\n
    \n
  • The first field value represents the first group of (eight) hex\ndigits, taken as a big-endian u32 value. For V1 UUIDs, this field\nrepresents the low 32 bits of the timestamp.
  • \n
  • The second field value represents the second group of (four) hex\ndigits, taken as a big-endian u16 value. For V1 UUIDs, this field\nrepresents the middle 16 bits of the timestamp.
  • \n
  • The third field value represents the third group of (four) hex digits,\ntaken as a big-endian u16 value. The 4 most significant bits give\nthe UUID version, and for V1 UUIDs, the last 12 bits represent the\nhigh 12 bits of the timestamp.
  • \n
  • The last field value represents the last two groups of four and twelve\nhex digits, taken in order. The first 1-3 bits of this indicate the\nUUID variant, and for V1 UUIDs, the next 13-15 bits indicate the clock\nsequence and the last 48 bits indicate the node ID.
  • \n
\n
§Examples
\n
let uuid = Uuid::nil();\n\nassert_eq!(uuid.as_fields(), (0, 0, 0, &[0u8; 8]));\n\nlet uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n\nassert_eq!(\n    uuid.as_fields(),\n    (\n        0xa1a2a3a4,\n        0xb1b2,\n        0xc1c2,\n        &[0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8],\n    )\n);
Source

pub fn to_fields_le(&self) -> (u32, u16, u16, &[u8; 8])

Returns the four field values of the UUID in little-endian order.

\n

The bytes in the returned integer fields will be converted from\nbig-endian order. This is based on the endianness of the UUID,\nrather than the target environment so bytes will be flipped on both\nbig and little endian machines.

\n
§Examples
\n
use uuid::Uuid;\n\nlet uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n\nassert_eq!(\n    uuid.to_fields_le(),\n    (\n        0xa4a3a2a1,\n        0xb2b1,\n        0xc2c1,\n        &[0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8],\n    )\n);
Source

pub const fn as_u128(&self) -> u128

Returns a 128bit value containing the value.

\n

The bytes in the UUID will be packed directly into a u128.

\n
§Examples
\n
let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n\nassert_eq!(\n    uuid.as_u128(),\n    0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8,\n);
Source

pub const fn to_u128_le(&self) -> u128

Returns a 128bit little-endian value containing the value.

\n

The bytes in the u128 will be flipped to convert into big-endian\norder. This is based on the endianness of the UUID, rather than the\ntarget environment so bytes will be flipped on both big and little\nendian machines.

\n

Note that this will produce a different result than\nUuid::to_fields_le, because the entire UUID is reversed, rather\nthan reversing the individual fields in-place.

\n
§Examples
\n
let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n\nassert_eq!(\n    uuid.to_u128_le(),\n    0xd8d7d6d5d4d3d2d1c2c1b2b1a4a3a2a1,\n);
Source

pub const fn as_u64_pair(&self) -> (u64, u64)

Returns two 64bit values containing the value.

\n

The bytes in the UUID will be split into two u64.\nThe first u64 represents the 64 most significant bits,\nthe second one represents the 64 least significant.

\n
§Examples
\n
let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\nassert_eq!(\n    uuid.as_u64_pair(),\n    (0xa1a2a3a4b1b2c1c2, 0xd1d2d3d4d5d6d7d8),\n);
Source

pub const fn as_bytes(&self) -> &[u8; 16]

Returns a slice of 16 octets containing the value.

\n

This method borrows the underlying byte value of the UUID.

\n
§Examples
\n
let bytes1 = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\nlet uuid1 = Uuid::from_bytes_ref(&bytes1);\n\nlet bytes2 = uuid1.as_bytes();\nlet uuid2 = Uuid::from_bytes_ref(bytes2);\n\nassert_eq!(uuid1, uuid2);\n\nassert!(std::ptr::eq(\n    uuid2 as *const Uuid as *const u8,\n    &bytes1 as *const [u8; 16] as *const u8,\n));
Source

pub const fn into_bytes(self) -> [u8; 16]

Consumes self and returns the underlying byte value of the UUID.

\n
§Examples
\n
let bytes = [\n    0xa1, 0xa2, 0xa3, 0xa4,\n    0xb1, 0xb2,\n    0xc1, 0xc2,\n    0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n];\nlet uuid = Uuid::from_bytes(bytes);\nassert_eq!(bytes, uuid.into_bytes());
Source

pub const fn to_bytes_le(&self) -> [u8; 16]

Returns the bytes of the UUID in little-endian order.

\n

The bytes for each field will be flipped to convert into little-endian order.\nThis is based on the endianness of the UUID, rather than the target environment\nso bytes will be flipped on both big and little endian machines.

\n

Note that ordering is applied to each field, rather than to the bytes as a whole.\nThis ordering is compatible with Microsoft’s mixed endian GUID format.

\n
§Examples
\n
use uuid::Uuid;\n\nlet uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n\nassert_eq!(\n    uuid.to_bytes_le(),\n    ([\n        0xa4, 0xa3, 0xa2, 0xa1, 0xb2, 0xb1, 0xc2, 0xc1, 0xd1, 0xd2,\n        0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8\n    ])\n);
Source

pub const fn is_nil(&self) -> bool

Tests if the UUID is nil (all zeros).

\n
Source

pub const fn is_max(&self) -> bool

Tests if the UUID is max (all ones).

\n
Source

pub const fn encode_buffer() -> [u8; 45]

A buffer that can be used for encode_... calls, that is\nguaranteed to be long enough for any of the format adapters.

\n
§Examples
\n
let uuid = Uuid::nil();\n\nassert_eq!(\n    uuid.simple().encode_lower(&mut Uuid::encode_buffer()),\n    \"00000000000000000000000000000000\"\n);\n\nassert_eq!(\n    uuid.hyphenated()\n        .encode_lower(&mut Uuid::encode_buffer()),\n    \"00000000-0000-0000-0000-000000000000\"\n);\n\nassert_eq!(\n    uuid.urn().encode_lower(&mut Uuid::encode_buffer()),\n    \"urn:uuid:00000000-0000-0000-0000-000000000000\"\n);
Source

pub const fn get_timestamp(&self) -> Option<Timestamp>

If the UUID is the correct version (v1, v6, or v7) this will return\nthe timestamp in a version-agnostic Timestamp. For other versions\nthis will return None.

\n
§Roundtripping
\n

This method is unlikely to roundtrip a timestamp in a UUID due to the way\nUUIDs encode timestamps. The timestamp returned from this method will be truncated to\n100ns precision for version 1 and 6 UUIDs, and to millisecond precision for version 7 UUIDs.

\n
Source

pub const fn get_node_id(&self) -> Option<[u8; 6]>

If the UUID is the correct version (v1, or v6) this will return the\nnode value as a 6-byte array. For other versions this will return None.

\n
",0,"meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Uuid

Source

pub fn parse_str(input: &str) -> Result<Uuid, Error>

Parses a Uuid from a string of hexadecimal digits with optional\nhyphens.

\n

Any of the formats generated by this module (simple, hyphenated, urn,\nMicrosoft GUID) are supported by this parsing function.

\n

Prefer try_parse unless you need detailed user-facing diagnostics.\nThis method will be eventually deprecated in favor of try_parse.

\n
§Examples
\n

Parse a hyphenated UUID:

\n\n
let uuid = Uuid::parse_str(\"550e8400-e29b-41d4-a716-446655440000\")?;\n\nassert_eq!(Some(Version::Random), uuid.get_version());\nassert_eq!(Variant::RFC4122, uuid.get_variant());
Source

pub const fn try_parse(input: &str) -> Result<Uuid, Error>

Parses a Uuid from a string of hexadecimal digits with optional\nhyphens.

\n

This function is similar to parse_str, in fact parse_str shares\nthe same underlying parser. The difference is that if try_parse\nfails, it won’t generate very useful error messages. The parse_str\nfunction will eventually be deprecated in favor of try_parse.

\n

To parse a UUID from a byte stream instead of a UTF8 string, see\ntry_parse_ascii.

\n
§Examples
\n

Parse a hyphenated UUID:

\n\n
let uuid = Uuid::try_parse(\"550e8400-e29b-41d4-a716-446655440000\")?;\n\nassert_eq!(Some(Version::Random), uuid.get_version());\nassert_eq!(Variant::RFC4122, uuid.get_variant());
Source

pub const fn try_parse_ascii(input: &[u8]) -> Result<Uuid, Error>

Parses a Uuid from a string of hexadecimal digits with optional\nhyphens.

\n

The input is expected to be a string of ASCII characters. This method\ncan be more convenient than try_parse if the UUID is being\nparsed from a byte stream instead of from a UTF8 string.

\n
§Examples
\n

Parse a hyphenated UUID:

\n\n
let uuid = Uuid::try_parse_ascii(b\"550e8400-e29b-41d4-a716-446655440000\")?;\n\nassert_eq!(Some(Version::Random), uuid.get_version());\nassert_eq!(Variant::RFC4122, uuid.get_variant());
",0,"meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Uuid

Source

pub fn new_v4() -> Uuid

Creates a random UUID.

\n

This uses the getrandom crate to utilise the operating system’s RNG\nas the source of random numbers. If you’d like to use a custom\ngenerator, don’t use this method: generate random bytes using your\ncustom generator and pass them to the\nuuid::Builder::from_random_bytes function\ninstead.

\n

Note that usage of this method requires the v4 feature of this crate\nto be enabled.

\n
§Examples
\n

Basic usage:

\n\n
let uuid = Uuid::new_v4();\n\nassert_eq!(Some(Version::Random), uuid.get_version());
§References
\n\n
",0,"meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Uuid

Source

pub fn now_v7() -> Uuid

Create a new version 7 UUID using the current time value.

\n

This method is a convenient alternative to Uuid::new_v7 that uses the current system time\nas the source timestamp. All UUIDs generated through this method by the same process are\nguaranteed to be ordered by their creation.

\n
Source

pub fn new_v7(ts: Timestamp) -> Uuid

Create a new version 7 UUID using a time value and random bytes.

\n

When the std feature is enabled, you can also use Uuid::now_v7.

\n

Note that usage of this method requires the v7 feature of this crate\nto be enabled.

\n

Also see Uuid::now_v7 for a convenient way to generate version 7\nUUIDs using the current system time.

\n
§Examples
\n

A v7 UUID can be created from a unix Timestamp plus a 128 bit\nrandom number. When supplied as such, the data will be combined\nto ensure uniqueness and sortability at millisecond granularity.

\n\n
let ts = Timestamp::from_unix(NoContext, 1497624119, 1234);\n\nlet uuid = Uuid::new_v7(ts);\n\nassert!(\n    uuid.hyphenated().to_string().starts_with(\"015cb15a-86d8-7\")\n);
\n

A v7 UUID can also be created with a counter to ensure batches of\nUUIDs created together remain sortable:

\n\n
let context = ContextV7::new();\nlet uuid1 = Uuid::new_v7(Timestamp::from_unix(&context, 1497624119, 1234));\nlet uuid2 = Uuid::new_v7(Timestamp::from_unix(&context, 1497624119, 1234));\n\nassert!(uuid1 < uuid2);
§References
\n\n
",0,"meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Copy for Uuid

","Copy","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl Eq for Uuid

","Eq","meta_srv::procedure::repartition::group::GroupId"],["
Source§

impl StructuralPartialEq for Uuid

","StructuralPartialEq","meta_srv::procedure::repartition::group::GroupId"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() //{"start":55,"fragment_lengths":[140976]}