fill_to_string

Function fill_to_string 

Source
pub fn fill_to_string<F, E>(
    template: &str,
    filler: F,
) -> Result<String, Error<'_, E>>
where F: Filler<String, E>,
Available on crate feature alloc only.
Expand description

Fill a template, producing a new string.

This is a convenience function for ergonomics in the case where you aren’t fussed about allocations and are using the standard String type.

See also StrExt::fill_to_string, which respells fill_to_string(template, filler) as template.fill_to_string(filler).