# `Decree.UUID`
[🔗](https://github.com/sparkle-space/decree/blob/v0.1.0/lib/decree/uuid.ex#L5)

Generate and format random, version 4 UUIDs.

# `hex`

```elixir
@type hex() :: &lt;&lt;_::288&gt;&gt;
```

A hex-encoded UUID string.

# `raw`

```elixir
@type raw() :: &lt;&lt;_::128&gt;&gt;
```

A raw binary representation of a UUID.

# `binary_to_string!`

```elixir
@spec binary_to_string!(raw()) :: hex()
```

# `canonical?`

```elixir
@spec canonical?(term()) :: boolean()
```

Whether a value is a lowercase canonical UUID string: 36 bytes, with hyphens at 8, 13,
18 and 23 and only `0-9a-f` otherwise.

An uppercase UUID, the raw 16-byte form and anything that is not a binary are not.

# `string_to_binary!`

```elixir
@spec string_to_binary!(hex()) :: raw()
```

Converts a string representing a UUID into a raw binary.

# `uuid4`

```elixir
@spec uuid4() :: hex()
```

Generates a random, version 4 UUID.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
