Skip to content

Guid

Windows globally unique identifier mirroring the native GUID fields.

Constructor

Guid value

Parses canonical GUID text or binary, or copies an existing Guid.

Binary values use the 16-byte native Windows in-memory layout.

Parameters

NameTypeDescription
value (Str | Bin | Guid) GUID text, native packet, or Guid.

Errors

ValueError if the text is invalid or bytes are not exactly 16 long.

Example

let id = Guid "00112233-4455-6677-8899-aabbccddeeff"
let copy = Guid $id

Class Fields

NIL

The nil Guid, 00000000-0000-0000-0000-000000000000.

Fields

bytes

The raw 16-byte native Windows in-memory GUID packet.

data1

The Data1 field.

data2

The Data2 field.

data3

The Data3 field.

data4

The 8-byte Data4 field.

Methods

(eq) other

Compares two GUID values.

(str)()

Returns the canonical hyphenated GUID text.

generate() -> Guid

Generates a random Guid.