obus

Pure Ocaml implementation of the D-Bus protocol
Library obus
Module OBus_uuid

D-Bus uuid are used to distinguish message buses, addresses, and machines.

Note that they are not compatible with RFC4122.

type t
val generate : unit -> t

Generate a new uuid

val of_string : string -> t

Create a uuid from a string. The string must contain an hex-encoded uuid, i.e. be of length 32 and only contain hexadecimal characters. It raise a failure otherwise.

  • raises Invalid_argument

    if the string does not contain a valid uuid.

val to_string : t -> string

Return a hex-encoded string representation of an uuid.