RustQ-authored full Kiwi decoder macro helpers.
Summary
Types
The Rust KiwiEnumVariant: an enum value and the atom name it decodes to.
The Rust KiwiFullDecodeFn: decodes one value of a type into a term.
The Rust KiwiFullField: a message field id, its index among the struct's values, and how to
decode it.
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 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.
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
Types
@type kiwi_enum_variant() :: %{ value: RustQ.Type.u32(), name: RustQ.Type.raw(:"&'static str") }
The Rust KiwiEnumVariant: an enum value and the atom name it decodes to.
@type kiwi_full_decode_fn() ::
RustQ.Type.raw(
:"for<'a> fn(Env<'a>, &mut Decoder<'_>) -> NifResult<Term<'a>>"
)
The Rust KiwiFullDecodeFn: decodes one value of a type into a term.
@type kiwi_full_field() :: %{ id: RustQ.Type.u32(), index: RustQ.Type.usize(), repeated: boolean(), decode: kiwi_full_decode_fn() }
The Rust KiwiFullField: a message field id, its index among the struct's values, and how to
decode it.
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 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 fragments([atom()]) :: [RustQ.Rust.Fragment.t()]
@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(RustQ.Type.path(:KiwiEnumVariant)) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_full_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_full_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_full_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_full_field_value( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))), RustQ.Type.ref(RustQ.Type.path(:KiwiFullField)) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec kiwi_full_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_full_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_full_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_full_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_full_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_full_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.
@spec kiwi_message_fields( RustQ.Type.path(:Env, RustQ.Type.lifetime(:a)), RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))), RustQ.Type.str(), RustQ.Type.slice(RustQ.Type.path(:Atom)), RustQ.Type.vec(term()), RustQ.Type.slice(RustQ.Type.path(:KiwiFullField)) ) :: RustQ.Type.nif_result(term())
A Rust function defrust generates. It runs only as Rust; calling it from Elixir
raises.
@spec macro_call( atom(), keyword() ) :: RustQ.Rust.Fragment.t()