Trait uuid_simd::UuidExt

source ·
pub trait UuidExt: Sized {
    fn parse(src: impl AsRef<[u8]>) -> Result<Self, Error>;
    fn parse_simple(src: impl AsRef<[u8]>) -> Result<Self, Error>;
    fn parse_hyphenated(src: impl AsRef<[u8]>) -> Result<Self, Error>;
    fn format_simple(&self) -> Simple<'_>;
    fn format_hyphenated(&self) -> Hyphenated<'_>;
}
Available on crate feature uuid only.
Expand description

An extension trait for uuid::Uuid

Required Methods§

Parses an UUID from arbitrary bytes.

Errors

This function returns Err if:

  • The length of src doesn’t match any UUID format variants.
  • The content of src is invalid.

Parses a simple UUID from arbitrary bytes.

Errors

This function returns Err if:

  • The length of src doesn’t match the “simple” format.
  • The content of src is invalid.

Parses a hyphenated UUID from arbitrary bytes.

Errors

This function returns Err if:

  • The length of src doesn’t match the “hyphenated” format.
  • The content of src is invalid.

Returns a fmt adapter with “simple” format.

Returns a fmt adapter with “hyphenated” format.

Implementations on Foreign Types§

Available on crate feature uuid only.
Available on crate feature uuid only.
Available on crate feature uuid only.
Available on crate feature uuid only.
Available on crate feature uuid only.

Implementors§