kewrite!() { /* proc-macro */ }
Expand description
Write a set of values into a Formatter
, stopping as soon as a value doesn’t fit the specification for its field.
Contrary to keformat
doesn’t build the Formatter into a Key Expression.
kewrite!($formatter, $($ident [= $expr]),*)
will attempt to write $expr
into their respective $ident
fields for $formatter
.
$formatter
must be an expression that dereferences to &mut Formatter
.
$expr
must resolve to a value that implements core::fmt::Display
.
$expr
defaults to $ident
if omitted.
This macro always results in an expression that resolves to Result<&mut Formatter, FormatSetError>
.