Dextrin.Uuid (Dextrin v0.1.0)

Copy Markdown View Source

DXN uuid (@uuid "...", RFC 4122). Wraps 16 raw bytes, not the 36-char text form — the text form exists only at the .dxn/.dxnb encoding boundary (parse/1/format/1 below convert between them); the in-memory value stays the compact, comparison-cheap byte form.

Summary

Functions

Renders the canonical 36-char hyphenated text form.

Parses the canonical 36-char hyphenated text form.

Types

t()

@type t() :: %Dextrin.Uuid{bytes: <<_::128>>}

Functions

format(uuid)

@spec format(t()) :: String.t()

Renders the canonical 36-char hyphenated text form.

new(arg)

@spec new(<<_::128>>) :: t()

parse(str)

@spec parse(String.t()) :: {:ok, t()} | {:error, :invalid_uuid}

Parses the canonical 36-char hyphenated text form.