Skip to main content

render_static

Function render_static 

Source
pub fn render_static(
    tera: &Tera,
    name: &str,
    ctx: &Context,
    stage: &str,
) -> Result<String>
Expand description

Render a previously-registered Tera template with ctx, returning the rendered string. Stage label is included in the error context so a render failure surfaces as <stage>: render '<name>': <tera-msg> rather than a panic.