# `RustQ.Template`
[🔗](https://github.com/elixir-crab/rustq/blob/v1.0.0-rc.19/lib/rustq/template.ex#L1)

Parsed Rust template plus pending substitutions.

# `t`

```elixir
@type t() :: %RustQ.Template{
  bindings: keyword(),
  filename: String.t(),
  source: String.t(),
  splices: [{atom(), term()}]
}
```

# `expand_includes`

Replaces each `__rq_include!("path")` marker with the file it names, relative to
`:include_dir` or the template's directory, rejecting include cycles.

# `maybe_expand_includes`

Expands `__rq_include!` markers when the `:include_dir` option is given.

# `maybe_rustfmt`

Formats rendered code with `rustfmt`, or the command the `:rustfmt` option names.

# `normalize_errors`

Turns native template errors into maps with atom fields, tagged with the template's file.

# `with_preamble`

Prepends the `:preamble` option to rendered code.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
