UUID

RFC4122 compliant UUIDs

Constructors

this
this(ubyte[16] bytes)

Constructs a UUID from the specified byte slice

this
this(uint time_low, ushort time_mid, ushort time_hi_and_version, ubyte clk0, ubyte clk1, ubyte d0, ubyte d1, ubyte d2, ubyte d3, ubyte d4, ubyte d5)

Provides compatibility with .NET's Guid struct.

this
this(string text)

Constructs a UUID from the specified string.

Members

Aliases

getVariant
deprecated alias getVariant = uuidVariant
Undocumented in source.
getVersion
deprecated alias getVersion = uuidVersion
Undocumented in source.
min
alias min = nil
Undocumented in source.

Functions

opCmp
int opCmp(UUID other)

Compares 2 UUIDs lexically.

opEquals
bool opEquals(UUID other)

Checks equality between 2 UUIDs.

toBytes
ubyte[16] toBytes()

Returns byte stream from UUID with data in network order.

toString
nstring toString()

Returns UUID string

Manifest constants

uuidStringLength
enum uuidStringLength;

Length of a UUID string

Properties

data
ubyte[] data [@property getter]

The underlying data of the UUID.

uuidVariant
UUIDVariant uuidVariant [@property getter]

The variant of the UUID structure

uuidVersion
int uuidVersion [@property getter]

The version of the UUID structure

Static functions

createRandom
UUID createRandom(RandomBase random)

Creates a new UUIDv3 with a specified random number generator.

parse
UUID parse(string slice)

Tries to parse a UUID from a string.

validate
bool validate(string slice)

Validates the correctness of a UUID string.

Variables

max
enum UUID max;

Special "max" UUID

nil
enum UUID nil;

Special "nil" UUID

Meta