pub fn render<T: Serialize>(
template_name: &str,
data: &T,
mode: OutputMode,
) -> Result<String>Expand description
Render a template with the given data and output mode.
For JSON mode, serializes the data directly (not through the template) to produce machine-readable output.