std.uuid

  • A UUID, or
  • Universally unique identifier,
  • is intended to uniquely identify information in a distributed environment
  • without significant central coordination. It can be
  • used to tag objects with very short lifetimes, or to reliably identify very
  • persistent objects across a network. *
  • UUIDs have many applications. Some examples follow: Databases may use UUIDs to identify
  • rows or records in order to ensure that they are unique across different
  • databases, or for publication/subscription services. Network messages may be
  • identified with a UUID to ensure that different parts of a message are put back together
  • again. Distributed computing may use UUIDs to identify a remote procedure call.
  • Transactions and classes involved in serialization may be identified by UUIDs.
  • Microsoft's component object model (COM) uses UUIDs to distinguish different software
  • component interfaces. UUIDs are inserted into documents from Microsoft Office programs.
  • UUIDs identify audio or video streams in the Advanced Systems Format (ASF). UUIDs are
  • also a basis for OIDs (object identifiers), and URNs (uniform resource name).
  • An attractive feature of UUIDs when compared to alternatives is their relative small size,
  • of 128 bits, or 16 bytes. Another is that the creation of UUIDs does not require
  • a centralized authority.
  • When UUIDs are generated by one of the defined mechanisms, they are either guaranteed
  • to be unique, different from all other generated UUIDs (that is, it has never been
  • generated before and it will never be generated again), or it is extremely likely
  • to be unique (depending on the mechanism).
  • For efficiency, UUID is implemented as a struct. UUIDs are therefore empty if not explicitly
  • initialized. An UUID is empty if UUID.empty, empty is true. Empty UUIDs are equal to
  • UUID.init, which is a UUID with all 16 bytes set to 0.
  • Use UUID's constructors or the UUID generator functions to get an initialized UUID.
  • This is a port of boost.uuid from the Boost project with some minor additions and API
  • changes for a more D-like API.

    Standards

    RFC 4122

    See Also

    http://en.wikipedia.org/wiki/Universally_unique_identifier
  • Source: std/uuid.d