Rendering boundary for structural RustQ AST and explicit Rust fragments.
Build generated Rust with RustQ.Rust.AST.Builder, ItemBuilder,
PatternBuilder, and TypeBuilder. Keep those values structural until they
are passed to a RustQ template or explicitly rendered here.
Use fragment/2 only for small Rust syntax escapes that RustQ cannot yet
represent as AST.
Summary
Functions
Builds an explicit Rust source fragment for a known splice context.
Renders one Rust AST item, struct field, or explicit fragment.
Renders a list of Rust items separated by blank lines.
Renders a structural Rust type.
Functions
@spec fragment(RustQ.Rust.Fragment.kind(), iodata()) :: RustQ.Rust.Fragment.t()
Builds an explicit Rust source fragment for a known splice context.
@spec render( RustQ.Rust.AST.item() | RustQ.Rust.AST.StructField.t() | RustQ.Rust.Fragment.t() | iodata() ) :: String.t()
Renders one Rust AST item, struct field, or explicit fragment.
@spec render_all([RustQ.Rust.AST.item() | RustQ.Rust.Fragment.t()]) :: String.t()
Renders a list of Rust items separated by blank lines.
Renders a structural Rust type.