Skip to main content

render

Function render 

Source
pub fn render(template: &str, bindings: &[(&str, &str)]) -> String
Expand description

Fill template from bindings in a single left-to-right pass: each bound placeholder’s value is emitted verbatim and never re-scanned, so a value containing another placeholder survives whatever order the bindings are given in. An unrecognised {…} is copied through untouched, which is what makes composing nested blocks safe — render the inner block first, then bind the finished text.