UUID that complies with RFC 4122.
UUID objects are immutable, hashable and usable as mapping keys.
The Display of UUIDs is like 12345678-1234-1234-1234-123456789abc;
UUIDs can be constructed using such strings, or 16-bytes strings with big-
endian byte order.
Usage
test {
let u1 = @uuid.from_hex("ddf99703-742f-7505-4c54-df36a9c243fe")
let u2 = @uuid.from_bytes(
Bytes::from_array([
221, 249, 151, 3, 116, 47, 117, 5, 76, 84, 223, 54, 169, 194, 67, 254,
]),
)
assert_eq(u1, u2)
}
Construct an RFC-4122-compliant v4 UUID:
test {
let _u = @uuid.from_hex("9558cfadb48547c70f9adf1f75cdef29").as_version(V4)
}