Indexed Kiwi schema for repeated runtime interpretation.
Prepared schemas preserve the parsed schema definitions while adding constant-
time definition, message-field, and enum-variant lookup tables. Build one with
KiwiCodec.SchemaInterpreter.prepare/1 and reuse it across encode/decode calls.
Summary
Functions
Returns the definition named name, or nil.
Returns the name of the enum definition_name's variant with value, or nil.
Returns the value of the enum definition_name's variant name, or nil.
Returns the field with tag id of the message definition_name, or nil.
Indexes a schema's definitions, message fields, and enum values for decoding.
Types
Functions
@spec definition(t(), String.t()) :: KiwiCodec.Schema.definition() | nil
Returns the definition named name, or nil.
Returns the name of the enum definition_name's variant with value, or nil.
Returns the value of the enum definition_name's variant name, or nil.
@spec message_field(t(), String.t(), pos_integer()) :: KiwiCodec.Schema.Field.t() | nil
Returns the field with tag id of the message definition_name, or nil.
@spec new(KiwiCodec.Schema.t()) :: t()
Indexes a schema's definitions, message fields, and enum values for decoding.