DXN keyword (:name in value position). Wraps a plain
String.t(), never an Elixir atom, for the same reason as
Dextrin.Symbol: atoms are never garbage collected on the BEAM, and
decoding untrusted, attacker-controlled data must never be able to
exhaust the atom table.
Summary
Functions
The keyword name as a trusted decode reads it: its atom, but a
Dextrin.Keyword still for a name whose atom is already a value --
:nan, :positive_infinity, :negative_infinity, :nil, :true,
:false -- so the keyword stays a keyword (Jan, 2026-10-20).
Types
@type t() :: %Dextrin.Keyword{name: String.t()}
Functions
The keyword name as a trusted decode reads it: its atom, but a
Dextrin.Keyword still for a name whose atom is already a value --
:nan, :positive_infinity, :negative_infinity, :nil, :true,
:false -- so the keyword stays a keyword (Jan, 2026-10-20).
iex> Dextrin.Keyword.trusted("ok")
:ok
iex> Dextrin.Keyword.trusted("nan")
%Dextrin.Keyword{name: "nan"}