Skip to main content

render

Function render 

Source
pub fn render(
    template: &str,
    parts: &[Part],
    kind: Kind,
) -> Result<Rendered, RenderError>
Expand description

Renders template against parts, refusing on any unfilled placeholder, unbalanced brace, or (for a URL-shaped kind) a control character in a part.

custom and unrecognised kinds render every placeholder raw. Every other kind percent-encodes by zone, computed from the template’s structure — see the module doc for why that has to be the template and not the output.