Modules§
- consts
- Template grammar constants, syntax characters, and utility functions.
Macros§
Structs§
- Compile
Options - Configuration for template compilation.
- Context
- Template rendering context — holds all variables available during rendering.
- DeError
- Error type for Value-to-Deserialize conversion.
- Frontmatter
- Parsed YAML frontmatter from a
.tmpl.mdfile. - Import
- A template import declaration:
[stem](path.tmpl.md). - Imported
Namespace - Resolved namespace from an imported template.
- SerError
- Error type for serde-to-Value conversion.
- Syntax
Error - A structured syntax error with optional line number and source context.
- Template
- A parsed template ready for rendering.
- Template
Cache - A template compilation cache parameterised over a
BuildHasherfor content-addressed invalidation. - Type
Check Error - Structured error from
VarType::checkwith the path to the mismatch. - Value
Type Error - Error returned when a
Valueis the wrong variant for a conversion. - VarDecl
- A variable declaration: name + type + optional default.
- Variant
Decl - A variant declaration inside an enum type.
Enums§
- Error
Kind - A stable,
Copycategorisation of aTemplateError. - Template
Error - Errors produced by the template engine.
- Value
- A value that can be inserted into a template.
- VarType
- Expected type of a template variable.
Constants§
- BUILTIN_
TYPE_ NAMES - Names of all built-in types. Used for shadowing checks in validation.
Functions§
- extract_
template_ stem - Extract the template stem (filename without extensions) from a path.
- from_
value - Convert a
Valueback into anyDeserializetype. - load_
template - Load a named template from a directory.
- parse_
frontmatter - Parse YAML frontmatter delimited by
---lines. - parse_
frontmatter_ with_ env - Parse YAML frontmatter with compile-time environment values.
- parse_
type_ annotation - Parses a type annotation string into a
VarType. - resolve_
imports - Resolve imports by reading referenced template files and extracting their type information.
- resolve_
imports_ with_ consts - Resolve imports with available constants for path interpolation.
- strip_
frontmatter - Strip YAML frontmatter delimited by
---and return only the body text. - to_
pascal_ case - Convert a
snake_case,kebab-case, or other string toPascalCase. - to_
value - Convert any
Serializetype into aValue.