KiwiCodec.RustlerGenerator.Sparse.Helpers (kiwi_codec v0.7.0)

Copy Markdown View Source

Sparse decoders: a struct or message decodes as a map of the fields present, keyed by their atoms, with __kiwi_module__ naming its generated Elixir module.

kiwi_sparse_struct_decoder! defines a struct's decoder. A message's comes from KiwiCodec.RustlerGenerator.Sparse.Messages, or with skip decoders from KiwiCodec.RustlerGenerator.Sparse.SkipMessages; enums use KiwiCodec.RustlerGenerator.Values' kiwi_enum_decoder!.

Summary

Types

The Rust KiwiSparseField: a field's id, key, and how to decode its value.

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.

Types

kiwi_sparse_field()

@type kiwi_sparse_field() :: %{
  id: RustQ.Type.u32(),
  name: RustQ.Type.raw(:"&'static str"),
  repeated: RustQ.Type.bool(),
  decode: RustQ.Type.path(:KiwiDecodeFn)
}

The Rust KiwiSparseField: a field's id, key, and how to decode its value.

Functions

__mix_recompile__?()

Whether the module's Rust file appeared or went since the module compiled.

__rustq_asts__()

The RustQ AST of each defrust definition.

__rustq_callables__()

Callable metadata for the module's definitions.

__rustq_items__()

The Rust items the module generates, in order.

__rustq_macro_definitions__()

The module's defrustmacro definitions.

__rustq_macro_items__()

The macro_rules! items defrustmacro emits.

__rustq_rust_modules__()

The Rust modules the module's defrustmods map its aliases, or itself ([]), to.

__rustq_source__()

The Rust source the module generates.

__rustq_type_asts__()

The RustQ AST of each declared Rust type.

__rustq_type_items__()

The Rust items the module's types generate.

__rustq_types__()

The Rust types the module's @types declare.

kiwi_sparse_message_fields(arg1, arg2, arg3, arg4, arg5)

A Rust function defrust generates. It runs only as Rust; calling it from Elixir raises.

kiwi_sparse_message_fields_remaining(arg1, arg2, arg3, arg4, arg5, arg6)

A Rust function defrust generates. It runs only as Rust; calling it from Elixir raises.

kiwi_sparse_module_entry(arg1, arg2, arg3, arg4)

A Rust function defrust generates. It runs only as Rust; calling it from Elixir raises.

kiwi_sparse_struct_fields(arg1, arg2, arg3, arg4)

A Rust function defrust generates. It runs only as Rust; calling it from Elixir raises.