Skip to main content

format

Function format 

Source
pub fn format(
    template: &str,
    lookup: impl Fn(&str) -> Option<FormatValue>,
) -> String
Expand description

Expand template, resolving each field name through lookup.

A field that lookup does not know, or a spec the value rejects, is left in place verbatim: upstream would raise from str.format, which in a progress display means a crash mid-render.