[][src]Derive Macro format_macro::proc_macro_hack_lazy_format

#[derive(proc_macro_hack_lazy_format)]

Lazy format macro

[lazy_format!] is syntax sugar of Display.

The first form of [lazy_format!] receives closure as the only one argument.

This example is not tested
lazy_format!(|f| ...);

it expands to:

This example is not tested
Display(move |f| ...);

The second form of [lazy_format!] has a syntax identical to the syntax of format!. See fmt for more information.

This example is not tested
lazy_format!("...", arg0, arg1, ...);

it expands to:

This example is not tested
Display(move |f| write!(f, "...", arg0, arg1, ...));