Macro format::lazy_format [−][src]
lazy_format!() { /* proc-macro */ }
Lazy format macro
lazy_format!
is syntax sugar of Display
.
The first form of lazy_format!
receives closure as the only one
argument.
ⓘ
lazy_format!(|f| ...);
it expands to:
ⓘ
Display(move |f| ...);
The second form of lazy_format!
has a syntax identical to the syntax of
format!
. See fmt
for more information.
ⓘ
lazy_format!("...", arg0, arg1, ...);
it expands to:
ⓘ
Display(move |f| write!(f, "...", arg0, arg1, ...));