pub trait Writer {
// Required method
fn write(&self, f: &mut Formatter<'_>) -> Result;
}
Expand description
A trait for types that can be written into a string.
This works very similarly to Debug
, and is automatically implemented if Debug
is
implemented for a type. It is also implemented for any writable type inside a Mutex
.
The derived implementation of Debug
may
change
between Rust versions, so if stability is key for your use case, please implement Writer
explicitly instead.