Skip to main content

render_to_string

Function render_to_string 

Source
pub fn render_to_string(
    template_path: &Utf8Path,
    source: &Utf8Path,
    config: &Config,
    yui: &YuiVars,
) -> Result<Option<String>>
Expand description

Render a single template and return the body it would produce right now, or Ok(None) if {# yui:when … #} / a config rule when would skip it for the current host. Used by yui diff to compute what the rendered file should contain so the drift can be diffed against what’s actually on disk.

Mirrors process_template’s skip / render decisions exactly, but doesn’t touch the report or the on-disk rendered output.