Idris2Doc : UUID

UUID

(source)

Definitions

record UUID : Type
  A UUID.

Implemented as a wrapper around a foreign object.

Totality: total
Visibility: public export
Constructor: 
MkUUID : GCAnyPtr -> UUID

Projection: 
.ptr : UUID -> GCAnyPtr

Hint: 
UUIDGen -> Ord UUID
.ptr : UUID -> GCAnyPtr
Visibility: public export
ptr : UUID -> GCAnyPtr
Visibility: public export
interface UUIDGen : Type
Constraints: Ord UUID
Methods:
fromBytes : Vect 16 Bits8 -> Maybe UUID
  A UUID from a byte vector, if the byte vector forms a valid UUID.
toBytes : UUID -> Vect 16 Bits8
  A UUID as a byte vector.
uuid1 : IO (UUID, Bool)
  UUID version 1.

Uses the current time and the local ethernet MAC address.

If the `Bool` is `False`, it is guaranteed that two concurrently running processes did not
obtain the same UUID. `True` does not necessarily guarantee the converse.
uuid3 : Vect 16 Bits8 -> String -> UUID
  UUID version 3.

Deterministic UUID created by MD5 hashing `namespace'` and `name`.
uuid4 : IO UUID
  UUID version 4.

Generates a UUID using high-quality randomness.

**Note**: For C, If none of libc `getRandom`, /dev/urandom or /dev/random are available,
a pseudo-random generator will be substituted, which may compromise UUID uniqueness.
uuid5 : Vect 16 Bits8 -> String -> UUID
  UUID version 5.

Deterministic UUID created by SHA1 hashing `namespace'` and `name`.
parse : String -> Maybe UUID
  Try to parse a UUID string (e.g. "1b4e28ba-2fa1-11d2-883f-b9a761bde3fb") as a UUID.
unparse : UUID -> String
  Convert a UUID to string format.
fromBytes : UUIDGen => Vect 16 Bits8 -> Maybe UUID
  A UUID from a byte vector, if the byte vector forms a valid UUID.

Visibility: public export
toBytes : UUIDGen => UUID -> Vect 16 Bits8
  A UUID as a byte vector.

Visibility: public export
uuid1 : UUIDGen => IO (UUID, Bool)
  UUID version 1.

Uses the current time and the local ethernet MAC address.

If the `Bool` is `False`, it is guaranteed that two concurrently running processes did not
obtain the same UUID. `True` does not necessarily guarantee the converse.

Visibility: public export
uuid3 : UUIDGen => Vect 16 Bits8 -> String -> UUID
  UUID version 3.

Deterministic UUID created by MD5 hashing `namespace'` and `name`.

Visibility: public export
uuid4 : UUIDGen => IO UUID
  UUID version 4.

Generates a UUID using high-quality randomness.

**Note**: For C, If none of libc `getRandom`, /dev/urandom or /dev/random are available,
a pseudo-random generator will be substituted, which may compromise UUID uniqueness.

Visibility: public export
uuid5 : UUIDGen => Vect 16 Bits8 -> String -> UUID
  UUID version 5.

Deterministic UUID created by SHA1 hashing `namespace'` and `name`.

Visibility: public export
parse : UUIDGen => String -> Maybe UUID
  Try to parse a UUID string (e.g. "1b4e28ba-2fa1-11d2-883f-b9a761bde3fb") as a UUID.

Visibility: public export
unparse : UUIDGen => UUID -> String
  Convert a UUID to string format.

Visibility: public export