uuidOf

fnvar uuidOf(scope const(ubyte)[16] bytes) @safe pure

Wraps 16 raw bytes as a UUID var.

The bytes are taken in Phobos's stored order (RFC 4122 big-endian); no byte-order guessing, no inference from byte arrays — this constructor is the only path from raw bytes to a UUID value. The inverse is v.as!UUID.data.

Parameters

bytesexactly 16 bytes in RFC 4122 big-endian order.

Returns

A var of kind Type.UUID.

Example:

import std.uuid: UUID;
auto u = UUID("00112233-4455-4677-8899-aabbccddeeff");
var v = uuidOf(u.data);
assert(v.as!UUID == u);