Validation and normalization of BTOON encoding options.
Options
:dictionary- aBtoon.Dictionarysession dictionary, ornil. Strings present in the dictionary are encoded asStringRef.:string_table-:auto(default) builds a per-message string table for strings absent from the session dictionary;:offwrites full strings instead.:no_string_table-trueomits the per-message string table entirely. Requires:dictionaryto be set. When enabled, all strings MUST be in the session dictionary or written inline. Overrides:string_table.:schema- aBtoon.Schemato encode in schema mode, ornil.:schema_id_uint16-trueencodes the schema ID as UInt16 (2 bytes) instead of UInt32 (4 bytes). Requires:schemato be set.:typed_arrays-true(default) encodes homogeneous numeric lists asTypedArray(tag0x0C).:object_tables-true(default) encodes homogeneous object lists as columnarObjectTable(tag0x0D).
Summary
Types
Validated encoding options.
Functions
Returns the default validated options.
Validates encoding options.
Validates encoding options, raising ArgumentError on error.
Types
@type validated() :: %{ dictionary: ToonEx.Btoon.Dictionary.t() | nil, string_table: :auto | :off, no_string_table: boolean(), schema: ToonEx.Btoon.Schema.t() | nil, schema_id_uint16: boolean(), typed_arrays: boolean(), object_tables: boolean() }
Validated encoding options.
Functions
@spec defaults() :: validated()
Returns the default validated options.
Validates encoding options.
Returns {:ok, validated} or {:error, message}.
Validates encoding options, raising ArgumentError on error.