CTFE: This function is supported in CTFE code. Note that error messages caused by a malformed UUID parsed at compile time can be cryptic, but errors are detected and reported at compile time.
UUID.this
this
(ref const scope ubyte[16] uuidData) @safe pure nothrow @nogcConstruct a UUID struct from the 16 byte representation of a UUID.
this
(const ubyte[16] uuidData) @safe pure nothrow @nogcditto
this
(T uuidData) @safe pureConstruct a UUID struct from the 16 byte representation of a UUID. Variadic constructor to allow a simpler syntax, see examples. You need to pass exactly 16 ubytes.
UUID V7 constructor
This implementation is not guaranteed to use a cryptographically secure PRNG. For more information please see: std.random.unpredictableSeed
Parameters
timestamp | the timestamp part of the UUID V7 |
random | UUID V7 has 74 bits of random data, which rounds to 10 ubyte's. If no random data is given, random data is generated. |
this
(in T[] uuid)Parse a UUID from its canonical string form. An UUID in its canonical form looks like this: 8ab3060e-2cba-4f23-b74c-b52db3bdfb46
Throws
UUIDParsingException if the input is invalid
Note
This is a strict parser. It only accepts the pattern above.
It doesn't support any leading or trailing characters. It only accepts characters used for hex numbers and the string must have hyphens exactly like above.
For a less strict parser, see parseUUID