KiwiCodec.RustlerGenerator.Values (kiwi_codec v0.7.0)

Copy Markdown View Source

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

kiwi_decode_fn()

@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.

kiwi_enum_variant()

@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

__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_bool_value(arg1, arg2)

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

kiwi_byte_value(arg1, arg2)

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

kiwi_bytes_value(arg1, arg2)

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

kiwi_enum_value(arg1, arg2, arg3)

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

kiwi_field_value(arg1, arg2, arg3, arg4)

@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.

kiwi_float_value(arg1, arg2)

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

kiwi_int64_value(arg1, arg2)

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

kiwi_int_value(arg1, arg2)

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

kiwi_string_value(arg1, arg2)

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

kiwi_uint64_value(arg1, arg2)

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

kiwi_uint_value(arg1, arg2)

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