#[template_function]Expand description
Registers a function as a named MiniJinja global function.
ยงSyntax
#[template_function] // uses the Rust function name
#[template_function(name = "fn_name")] // explicit template nameThe function is submitted via inventory and registered into the
MiniJinja environment when the TemplateEngine service starts.
The inventory::submit! call is guarded by #[cfg(feature = "templates")]
in the generated code, so the function definition is always compiled but
the registration only takes effect when that feature is enabled on modo.
Requires the templates feature on modo.