struct UUID

Overview

monkey patch UUID to introduce a new class method onto UUID

Included Modules

Defined in:

extlib.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_u128(u128 : UInt128, version : UUID::Version | Nil = nil, variant : UUID::Variant | Nil = nil) : UUID #

Returns a UUID from a given u128

NOTE The the most significant byte of the u128 is the most significant byte (left-most byte) of the UUID, and the least significant byte of the u128 is the least significant byte (right-most byte) of the UUID.


[View source]
def self.from_u128_inverted(u128 : UInt128, version : UUID::Version | Nil = nil, variant : UUID::Variant | Nil = nil) : UUID #

Returns a UUID from a given u128

NOTE This encoding is called "inverted" because the the most significant byte of the u128 is the least significant byte (right-most byte) of the UUID and the least significant byte of the u128 is the most significant byte (left-most byte) of the UUID.


[View source]

Instance Method Detail

def to_u128 #

[View source]
def to_u128_inverted #

[View source]