Function nanotemplate::template_default
source · [−]pub fn template_default<'v, T: PlaceholderValuePair<'v, impl Display + ?Sized + 'v>>(
template: &str,
values: impl IntoIterator<Item = T>,
default: &str
) -> Result<String, TemplateError>
Expand description
Renders a string from the template, replacing all instances of {placeholder}
with given values.
Placeholder name may only contain letters, numbers, dash, underscore and a dot.
Default value is used for missing placeholder values.