Expand description
Template rendering. Rust code passes typed context; this module owns everything about HTML generation.
§Loader contract
Per-request lookup via minijinja::Environment::set_loader. On
every render call the cache is cleared, forcing the loader closure
to re-resolve from disk so a developer can edit a template under
RUSTIO_TEMPLATE_DIR and see the change on the next request without
restarting the process.
Lookup order, by template name <path>:
<RUSTIO_TEMPLATE_DIR>/<path>— project disk override.- Embedded default — compiled into the binary via
include_str!.
Per-model lookup hook: callers that pass a model context can use
Templates::render_for_model to add a third tier:
<RUSTIO_TEMPLATE_DIR>/admin/<model>/<page>.html<RUSTIO_TEMPLATE_DIR>/<path>- Embedded default