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 the template source, named name, in a fresh
environment.
The template sees two variables: surface, the Surface, and content,
the CLI’s own serializable 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.