Dextrin.Binary.Tags (Dextrin v0.1.0)

Copy Markdown View Source

Pure constants — CBOR tag numbers and bit-layout tables, mirroring DXN.md §2.3 verbatim. No behavior lives here.

Summary

Functions

Duration bitmask field order, low bit first (DXN.md §2.3).

Regex flags byte bit order, low bit first (DXN.md §2.3).

Regex flags byte back to Regex.compile/2 option atoms.

Flag string used in .dxn text (~r/.../imsuxfr) to the wire's flags byte.

Flag letters to Regex.compile/2 option atoms — deliberately not a flag string (Regex.compile(pattern, "r") triggers an Elixir deprecation warning for /r; the equivalent atom list doesn't).

Regex flags byte, one bit per present flag (DXN.md §2.3).

Reverse of regex_flags_to_opts/1 — a compiled Regex's opts list back to DXN's flag-letter string, in bitmask order.

Functions

duration_bits()

@spec duration_bits() :: [atom()]

Duration bitmask field order, low bit first (DXN.md §2.3).

regex_bits()

@spec regex_bits() :: [{non_neg_integer(), String.t()}]

Regex flags byte bit order, low bit first (DXN.md §2.3).

regex_byte_to_opts(byte)

@spec regex_byte_to_opts(non_neg_integer()) :: [atom()]

Regex flags byte back to Regex.compile/2 option atoms.

regex_flags_to_byte(flags)

@spec regex_flags_to_byte(String.t()) :: non_neg_integer()

Flag string used in .dxn text (~r/.../imsuxfr) to the wire's flags byte.

regex_flags_to_opts(flags)

@spec regex_flags_to_opts(String.t()) :: [atom()]

Flag letters to Regex.compile/2 option atoms — deliberately not a flag string (Regex.compile(pattern, "r") triggers an Elixir deprecation warning for /r; the equivalent atom list doesn't).

regex_opts_to_byte(opts)

@spec regex_opts_to_byte([atom()]) :: non_neg_integer()

Regex flags byte, one bit per present flag (DXN.md §2.3).

regex_opts_to_flags(opts)

@spec regex_opts_to_flags([atom()]) :: String.t()

Reverse of regex_flags_to_opts/1 — a compiled Regex's opts list back to DXN's flag-letter string, in bitmask order.

t_array()

t_bignum_neg()

t_bignum_pos()

t_char()

t_custom()

t_date()

t_datetime_offset()

t_decimal()

t_duration()

t_keyword()

t_ordered()

t_rational()

t_regex()

t_set()

t_shareable()

t_shared_ref()

t_sorted_set()

t_stringref()

t_stringref_namespace()

t_struct()

t_symbol()

t_time()

t_timestamp()

t_tuple()

t_uri()

t_uuid()