Next: rfc.zlib
- zlib compression library, Previous: rfc.uri
- URI parsing and construction, Up: Library modules - Utilities [Contents][Index]
rfc.uuid
- UUIDThis module implements UUID defined in RFC4122.
It provides generators of UUID version 1 and 4, and writer/parser of the string represenation of UUIDs.
{rfc.uuid} Class of UUID instances. UUID instances are immutable.
{rfc.uuid}
Returns the raw value of uuid as 16-element u8vector
.
You shouldn’t mutate the returned u8vector.
{rfc.uuid} Returns the version number of uuid.
{rfc.uuid} A comparator to compare and hash uuids. See Basic comparators.
Note: Equality of uuids can be tested with equal?
.
{rfc.uuid}
We use PRNG to generate UUIDs. By default, we internally creates
a random source and randomize it. You can alter the random source
using parameterize
. The value must be a SRFI-27 random source
(see srfi.27
- Sources of Random Bits).
{rfc.uuid}
Deprecated.
Use uuid-random-source
parameter
to customize random source to be used in uuid generation.
{rfc.uuid} Generates a uuid with version 1 algorithm (timestamp and node id based). The optional node-id argument must be 48bit exact integer specifing the node ID (IEEE802 MAC address of the machine). If it is omitted, we generate a process-global random node ID (with the multicast bit set to 1, so that it won’t conflict with existing MAC address).
{rfc.uuid} Generates a uuid with version 4 algorithm (random numbers).
{rfc.uuid} Returns a nil-UUID (all bits zero).
{rfc.uuid}
Takes a string representation of UUID, parses it and returns
an uuid instance. If the string isn’t a valid UUID representation,
an error is thrown if the if-invalid keyword argument is omitted
or :error
, and #f
is returned if if-invalid is #f
.
Other than XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
format,
it recognizes the one with urn:uuid:
prefix,
the one enclosed by curly braces, and the one without hyphens.
{rfc.uuid}
Writes out a string representation of uuid,
in XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
format, to the given
port. If the port is omitted, current output port is used.
{rfc.uuid}
Returns a string representation of uuid,
in XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
format.
Next: rfc.zlib
- zlib compression library, Previous: rfc.uri
- URI parsing and construction, Up: Library modules - Utilities [Contents][Index]