This module describes the template syntax used by ructe.
A template consists of three basic parts:
First a preamble of
use statements, each prepended by an @ sign.
Secondly a declaration of the parameters the template takes.
And third, the template body.
@use any::rust::Type; @(name: &str, items: &[Type]) <html> ... </html>
The curly brackets,
}, is used for blocks (see Loops,
Conditionals, and Calling other templates below).
To use them in the template body, they must be escaped as
A value expression can be as simple as
The ability to call other templates for from a template makes both "tag libraries" and "base templates" possible with the same syntax.