Next: zlib圧縮ライブラリ, Previous: URIの解析と作成, Up: ライブラリモジュール - ユーティリティ [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.
{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 基本的な比較器.
{rfc.uuid} We use PRNG to generate UUIDs. By default, we internally creates a random source and randomize it. You can pass in your own random source instead (see ランダムビットのソース, for the details).
{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.
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: zlib圧縮ライブラリ, Previous: URIの解析と作成, Up: ライブラリモジュール - ユーティリティ [Contents][Index]