RustQ.Rust.AST.TypeBuilder (rustq v0.11.1)

Copy Markdown View Source

Constructors and normalization for Rust type AST nodes.

type/1 accepts existing type nodes, atom/list Rust paths, raw binary source, and structural tuples such as {:option, type}, {:result, ok, error}, {:vec, type}, tuple types, references, slices, and arrays. Binary source is normalized to RustQ.Rust.AST.TypeRaw; prefer raw/1 when an explicit escape makes generator intent clearer.

Summary

Functions

array(inner, size)

mut_ref(inner, opts \\ [])

nif_result(inner)

option(inner)

path(parts_or_part, opts \\ [])

raw(source)

ref(inner, opts \\ [])

result(ok, error)

slice(inner)

term(lifetime \\ :a)

tuple(items)

type(value)

unit()

vec(inner)