View source code
Display the source code in std/uuid.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Variable std.uuid.UUID.data
It is sometimes useful to get or set the 16 bytes of a UUID
directly.
Declaration
struct UUID
{
// ...
ubyte[16]
data;
// ...
}
Note
UUID
uses a 16-ubyte representation for the UUID
data
.
RFC 4122 defines a UUID
as a special structure in big-endian
format. These 16-ubytes always equal the big-endian structure
defined in RFC 4122.
Examples
auto rawData = uuid.data; //get data rawData[0] = 1; //modify uuid.data = rawData; //set data uuid.data[1] = 2; //modify directly
Authors
Johannes Pfau