KiwiCodec.PrimitiveType (kiwi_codec v0.2.1)

Copy Markdown View Source

Kiwi primitive type metadata.

This module is the source of truth for primitive type names used by parsed schemas, generated Elixir modules, runtime encoding, and binary schema type indexes.

Summary

Types

atom_name()

@type atom_name() ::
  :bool | :byte | :float | :int | :int64 | :string | :uint | :uint64

name()

@type name() :: String.t()

Functions

atom?(name)

@spec atom?(term()) :: boolean()

atoms()

@spec atoms() :: [atom_name()]

binary_schema_index(name)

@spec binary_schema_index(name() | nil) :: non_neg_integer() | nil

binary_schema_name!(index)

@spec binary_schema_name!(non_neg_integer()) :: name()

name?(name)

@spec name?(term()) :: boolean()

to_atom!(name)

@spec to_atom!(name()) :: atom_name()