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

Copy Markdown View Source

Skip decoders: they read past a value without building a term, for callers projecting a few fields out of a large message.

kiwi_skip_struct_decoder! defines a struct's skip decoder. A message's comes from KiwiCodec.RustlerGenerator.Skip.Messages, or with sparse decoders from KiwiCodec.RustlerGenerator.Sparse.SkipMessages. An enum is skipped as the uint it is on the wire.

Summary

Types

The Rust KiwiSkipField: a message field id and how to skip its value.

The Rust KiwiSkipFn: skips one value of a type.

The Rust KiwiSkipKind: how a field's value is skipped, once, repeated, or as bytes.

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.

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_skip_field()

@type kiwi_skip_field() :: %{id: RustQ.Type.u32(), kind: kiwi_skip_kind()}

The Rust KiwiSkipField: a message field id and how to skip its value.

kiwi_skip_fn()

@type kiwi_skip_fn() :: RustQ.Type.raw(:"fn(&mut Decoder<'_>) -> NifResult<()>")

The Rust KiwiSkipFn: skips one value of a type.

kiwi_skip_kind()

@type kiwi_skip_kind() ::
  RustQ.Type.enum(one: [kiwi_skip_fn()], repeated: [kiwi_skip_fn()], bytes: [])

The Rust KiwiSkipKind: how a field's value is skipped, once, repeated, or as bytes.

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_skip_bool_value(arg1)

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

kiwi_skip_byte_value(arg1)

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

kiwi_skip_bytes_value(arg1)

@spec kiwi_skip_bytes_value(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_)))
) ::
  RustQ.Type.nif_result(RustQ.Type.unit())

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

kiwi_skip_descriptor_kind(arg1, arg2, arg3)

@spec kiwi_skip_descriptor_kind(RustQ.Type.bool(), RustQ.Type.bool(), kiwi_skip_fn()) ::
  kiwi_skip_kind()

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

kiwi_skip_float_value(arg1)

@spec kiwi_skip_float_value(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_)))
) ::
  RustQ.Type.nif_result(RustQ.Type.unit())

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

kiwi_skip_int64_value(arg1)

@spec kiwi_skip_int64_value(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_)))
) ::
  RustQ.Type.nif_result(RustQ.Type.unit())

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

kiwi_skip_int_value(arg1)

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

kiwi_skip_kind(arg1, arg2)

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

kiwi_skip_message_fields(arg1, arg2, arg3)

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

kiwi_skip_repeated(arg1, arg2)

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

kiwi_skip_string_value(arg1)

@spec kiwi_skip_string_value(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_)))
) ::
  RustQ.Type.nif_result(RustQ.Type.unit())

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

kiwi_skip_struct_fields(arg1, arg2)

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

kiwi_skip_uint64_value(arg1)

@spec kiwi_skip_uint64_value(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_)))
) ::
  RustQ.Type.nif_result(RustQ.Type.unit())

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

kiwi_skip_uint_value(arg1)

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