fill

Function fill 

Source
pub fn fill<'a, F, W, E>(
    template: &'a str,
    filler: F,
    output: &mut W,
) -> Result<(), Error<'a, E>>
where F: Filler<W, E>, W: Write,
Expand description

The lowest-level form, as a function: fill the template string, into a provided writer.

This is the most efficient form. It splits a string by {…} sections, adding anything outside them to the output string (with escaped curlies dedoubled) and passing template regions through the filler, which handles pushing to the output string itself.

See also StrExt::fill_into which respells fill(template, filler, output) as template.fill_into(output, filler).