Skip to main content

render

Function render 

Source
pub fn render<T: Serialize>(
    name: &'static str,
    source: &'static str,
    surface: &Surface,
    content: &T,
) -> Result<String, Error>
Available on crate features surface-model and surface-templates only.
Expand description

Render one operator template with a Surface and consumer-owned context.

§Errors

Returns minijinja’s Error when source does not compile, or when rendering fails, such as on a variable the strict environment does not define.