128-bit universally unique identifier (UUID).
Main docs: Home
Classes | |
class | pw::uuid::Uuid |
Represents a 128-bit universally unique identifier (UUID). More... | |
Functions | |
constexpr | pw::uuid::Uuid::Uuid (span< const uint8_t, kSizeBytes > uuid_span) |
Creates a Uuid from a pw::span of 16 const bytes. | |
constexpr | pw::uuid::Uuid::Uuid (span< const std::byte, kSizeBytes > uuid_span) |
Creates a Uuid from a pw::span of 16 const std::byte. | |
static constexpr Result< Uuid > | pw::uuid::Uuid::FromSpan (span< const uint8_t > uuid_span) |
Create a Uuid from a const uint8_t span. | |
static constexpr Result< Uuid > | pw::uuid::Uuid::FromSpan (ConstByteSpan uuid_span) |
Create a Uuid from a const std::byte span. | |
template<size_t kSize, typename = std::enable_if_t<kSize == kSizeBytes>> | |
static constexpr Uuid | pw::uuid::Uuid::FromSpan (const std::array< uint8_t, kSize > &uuid_array) |
Creates a Uuid from a std::array of 16 const uint8_t. | |
template<size_t kSize, typename = std::enable_if_t<kSize == kSizeBytes>> | |
static constexpr Uuid | pw::uuid::Uuid::FromSpan (const std::array< std::byte, kSize > &uuid_array) |
Creates a Uuid from a std::array of 16 const bytes. | |
template<size_t kSize, typename = std::enable_if_t<kSize == kSizeBytes>> | |
static constexpr Uuid | pw::uuid::Uuid::FromSpan (const uint8_t(&uuid_array)[kSize]) |
Creates a Uuid from a C-style array of 16 const uint8_t. | |
template<size_t kSize, typename = std::enable_if_t<kSize == kSizeBytes>> | |
static constexpr Uuid | pw::uuid::Uuid::FromSpan (const std::byte(&uuid_array)[kSize]) |
Creates a Uuid from a C-style array of 16 const bytes. | |
static constexpr Result< Uuid > | pw::uuid::Uuid::FromString (std::string_view string) |
Create a Uuid from a string. | |
constexpr span< const uint8_t, kSizeBytes > | pw::uuid::Uuid::GetSpan () const |
Return the backing span holding the uuid. | |
constexpr bool | pw::uuid::Uuid::operator== (const Uuid &other) const |
constexpr bool | pw::uuid::Uuid::operator!= (const Uuid &other) const |
constexpr InlineString< kStringSize > | pw::uuid::Uuid::ToString () const |
Convert the Uuid to a human readable string. | |
Variables | |
static constexpr size_t | pw::uuid::Uuid::kSizeBytes = 16 |
Size of the UUID in bytes. | |
static constexpr size_t | pw::uuid::Uuid::kStringSize |
Length of the UUID's string representation. | |
|
inlinestaticconstexpr |
Creates a Uuid from a std::array of 16 const bytes.
This is guaranteed to be successful as the size is enforced by the type system.
uuid_array | A std::array containing the 16 bytes of the UUID. |
|
inlinestaticconstexpr |
Creates a Uuid from a std::array of 16 const uint8_t.
This is guaranteed to be successful as the size is enforced by the type system.
uuid_array | A std::array containing the 16 bytes of the UUID. |
|
inlinestaticconstexpr |
Creates a Uuid from a C-style array of 16 const bytes.
This is guaranteed to be successful as the size is enforced by the type system.
uuid_array | A C-style array containing the 16 bytes of the UUID. |
|
inlinestaticconstexpr |
Creates a Uuid from a C-style array of 16 const uint8_t.
This is guaranteed to be successful as the size is enforced by the type system.
uuid_array | A C-style array containing the 16 bytes of the UUID. |
|
inlinestaticconstexpr |
Create a Uuid from a const std::byte span.
uuid_span | A span containing the UUID bytes. |
|
inlinestaticconstexpr |
Create a Uuid from a const uint8_t span.
uuid_span | A span containing the UUID bytes. |
|
inlinestaticconstexpr |
Create a Uuid from a string.
string | A string representation of the UUID. |
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
|
staticconstexpr |
Length of the UUID's string representation.