pub trait Formatter<T> {
// Required method
fn format(&mut self, buf: &mut Buffer, thing: T);
}
Expand description
Format items for printing
Formatter
is basically the same as Inline
, except that the formatting isn’t implemented by the thing-to-be-printed itself and that this Formatter
may mutate itself.
This makes the trait very flexible.
Format and append the thing into the Buffer