KiwiCodec.RustlerGenerator.Name (kiwi_codec v0.7.0)

Copy Markdown View Source

The Rust names generated decoders give schema definitions and the functions reading their values: decode_node_change_from_decoder decodes a NodeChange fully, decode_sparse_node_change_from_decoder to the fields present, and skip_node_change_from_decoder skips one.

Summary

Functions

The function decoding a definition fully.

The function decoding a message's fields fully, into the struct's values.

The function reading one value of type as a term: a primitive's reader, or the definition's decoder, &decoder_function/1 or &sparse_function/1.

Returns the snake_case Rust identifier for a schema name. Schema names are identifiers, and a name that is not, as a schema decoded from binary may hold, fails where it is rendered.

The function skipping one value of a definition.

The function skipping one value of type; an enum is a uint on the wire.

The function skipping a primitive value.

The function decoding a definition to the fields present.

The function reading a primitive value as a term.

Functions

decoder_function(name)

@spec decoder_function(String.t()) :: atom()

The function decoding a definition fully.

field_name(name)

@spec field_name(String.t()) :: String.t()

message_fields_function(name)

@spec message_fields_function(String.t()) :: atom()

The function decoding a message's fields fully, into the struct's values.

module_atom_static(name)

@spec module_atom_static(String.t()) :: atom()

module_name(module_prefix, name)

@spec module_name(String.t(), String.t()) :: String.t()

read_function(type, decoder)

@spec read_function(String.t(), (String.t() -> atom())) :: atom()

The function reading one value of type as a term: a primitive's reader, or the definition's decoder, &decoder_function/1 or &sparse_function/1.

rust_identifier(name)

@spec rust_identifier(String.t()) :: String.t()

Returns the snake_case Rust identifier for a schema name. Schema names are identifiers, and a name that is not, as a schema decoded from binary may hold, fails where it is rendered.

skip_function(name)

@spec skip_function(String.t()) :: atom()

The function skipping one value of a definition.

skip_type_function(type, definition_map)

@spec skip_type_function(String.t(), map()) :: atom()

The function skipping one value of type; an enum is a uint on the wire.

skip_value_function(type)

@spec skip_value_function(KiwiCodec.PrimitiveType.name()) :: atom()

The function skipping a primitive value.

sparse_function(name)

@spec sparse_function(String.t()) :: atom()

The function decoding a definition to the fields present.

struct_keys_static(name)

@spec struct_keys_static(String.t()) :: atom()

value_function(type)

@spec value_function(KiwiCodec.PrimitiveType.name()) :: atom()

The function reading a primitive value as a term.