RustQ.Rustler.Term (rustq v0.11.1)

Copy Markdown View Source

Generates Rustler Term<'a> builders, decoders, and map access helpers.

Most helpers are authored with defrust or RustQ AST. The remaining EscapeExpr fragments are localized Rustler wrapper-boundary escapes for unsafe raw term construction or caller-supplied decoder expressions.

Summary

Functions

Builds safe Term<'a> map and struct construction helpers.

Builds a struct and decoder from an atom-keyed Rustler map term.

Builds a rustler::Encoder implementation from structural field metadata.

Returns the Rust atom identifiers referenced by a term encoder manifest.

Builds common map access and term decoding helpers.

Functions

builders(opts \\ [])

@spec builders(keyword()) :: [RustQ.Rust.AST.Function.t()]

Builds safe Term<'a> map and struct construction helpers.

decoder(name, opts)

Builds a struct and decoder from an atom-keyed Rustler map term.

encoder(name, opts)

@spec encoder(
  atom() | String.t(),
  keyword()
) :: RustQ.Rust.AST.Impl.t()

Builds a rustler::Encoder implementation from structural field metadata.

encoder_atom_names(opts)

@spec encoder_atom_names(keyword()) :: [String.t()]

Returns the Rust atom identifiers referenced by a term encoder manifest.

helpers(opts \\ [])

@spec helpers(keyword()) :: [RustQ.Rust.AST.Function.t()]

Builds common map access and term decoding helpers.