What full and sparse decoders share: reading primitive values and enums as terms, and a field's value, once or repeated, with the function decoding its type.
kiwi_enum_decoder! defines an enum's decoder, which decodes a known value as its
variant's atom and an unknown one as the number.
Summary
Types
The Rust KiwiDecodeFn: decodes one value of a type as a term.
The Rust KiwiEnumVariant: an enum value and the atom it decodes as.
Functions
Whether the module's Rust file appeared or went since the module compiled.
The RustQ AST of each defrust definition.
Callable metadata for the module's definitions.
The Rust items the module generates, in order.
The module's defrustmacro definitions.
The macro_rules! items defrustmacro emits.
The Rust modules the module's defrustmods map its aliases, or itself ([]), to.
The Rust source the module generates.
The RustQ AST of each declared Rust type.
The Rust items the module's types generate.
The Rust types the module's @types declare.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
Types
@type kiwi_decode_fn() ::
RustQ.Type.raw(
:"for<'a> fn(Env<'a>, &mut Decoder<'_>) -> NifResult<Term<'a>>"
)
The Rust KiwiDecodeFn: decodes one value of a type as a term.
@type kiwi_enum_variant() :: %{ value: RustQ.Type.u32(), name: RustQ.Type.raw(:"&'static str") }
The Rust KiwiEnumVariant: an enum value and the atom it decodes as.
Functions
Whether the module's Rust file appeared or went since the module compiled.
The RustQ AST of each defrust definition.
Callable metadata for the module's definitions.
The Rust items the module generates, in order.
The module's defrustmacro definitions.
The macro_rules! items defrustmacro emits.
The Rust modules the module's defrustmods map its aliases, or itself ([]), to.
The Rust source the module generates.
The RustQ AST of each declared Rust type.
The Rust items the module's types generate.
The Rust types the module's @types declare.
@spec kiwi_bool_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_byte_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_bytes_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_enum_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))), RustQ.Type.slice(kiwi_enum_variant()) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_field_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))), RustQ.Type.bool(), kiwi_decode_fn() ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_float_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_int64_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_int_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_string_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_uint64_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_uint_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.