KiwiCodec.RustlerGenerator.Skip.ValueHelpers (kiwi_codec v0.6.0)

Copy Markdown View Source

RustQ-authored primitive Kiwi skip helpers used by generated Rustler decoders.

Summary

Types

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

The Rust KiwiSkipFn: skips one value of a type.

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.

Returns kiwi_skip_kind, which skips a message field's value, and with descriptor_kind?: true also kiwi_skip_descriptor_kind, which skip message macros call.

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.

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.

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.

dispatch_fragments(opts \\ [])

@spec dispatch_fragments(keyword()) :: [RustQ.Rust.Fragment.t()]

Returns kiwi_skip_kind, which skips a message field's value, and with descriptor_kind?: true also kiwi_skip_descriptor_kind, which skip message macros call.

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(boolean(), boolean(), RustQ.Type.path(:KiwiSkipFn)) ::
  RustQ.Type.path(:KiwiSkipKind)

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)

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

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)

@spec kiwi_skip_struct_fields(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))),
  RustQ.Type.slice(RustQ.Type.path(:KiwiSkipKind))
) :: 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_remaining(arg1, arg2, arg3)

@spec kiwi_skip_struct_fields_remaining(
  RustQ.Type.mut_ref(RustQ.Type.path(:Decoder, RustQ.Type.lifetime(:_))),
  RustQ.Type.slice(RustQ.Type.path(:KiwiSkipKind)),
  RustQ.Type.usize()
) :: RustQ.Type.nif_result(RustQ.Type.unit())

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.

macro_fragments(names \\ [:kiwi_skip_struct_decoder, :kiwi_skip_message_decoder])

@spec macro_fragments([atom()]) :: [RustQ.Rust.Fragment.t()]