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
| Name | Type | Description |
|---|---|---|
value |
(Str | Bin | Guid) |
GUID text, binary form, or Guid. |
Errors
DataError if the text is invalid or bytes are not exactly
16 long.
Example
Class Fields
NIL @ Guid[get, set]The nil
Guid,00000000-0000-0000-0000-000000000000.
Class Methods
generate() -> Guid
Generates a random Guid.
Fields
bytes @ Bin[get]The 16-byte binary form Windows uses for a GUID.
data1 @ Int[get]The
Data1field.data2 @ Int[get]The
Data2field.data3 @ Int[get]The
Data3field.data4 @ Bin[get]The 8-byte
Data4field.
Methods
(eq) other -> Bool
Compares two GUID values.
Parameters
| Name | Type | Description |
|---|---|---|
other |
Value |
(lt) other -> Bool
Orders two GUID values.
Parameters
| Name | Type | Description |
|---|---|---|
other |
Guid |
(str)() -> Str
Returns the canonical hyphenated GUID text.