Dextrin.Bytes (Dextrin v0.1.0)

Copy Markdown View Source

DXN bytes (@bytes "...", base64 in text, raw binary in .dxnb). Wraps a plain Elixir binary() — needed because string is also a plain Elixir binary() (String.t() is not a distinct runtime type), so a bare binary can't otherwise tell "UTF-8 text" and "raw bytes that happen to be valid UTF-8" apart on re-encode. The same kind of ambiguity Dextrin.Char/Dextrin.Symbol/Dextrin.Keyword each wrap a bare value to avoid.

Summary

Types

t()

@type t() :: %Dextrin.Bytes{data: binary()}

Functions

new(data)

@spec new(binary()) :: t()