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

Copy Markdown View Source

Constructors and normalization for Rust type AST nodes.

type/1 accepts existing type nodes, Rust paths, and structural tuples such as {:option, type}, {:result, ok, error}, {:vec, type}, references, slices, arrays, and explicit {:raw, source} escapes. Prefer the named constructors when they make 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)

type(value)

unit()

vec(inner)