As far as I know there is currently no way to use a
Debug implementation with anything but
core::fmt::Formatter is only ever accessible by reference and is neither
Copy, would it be possible to change the definition of
pub type Formatter = dyn FormatterTrait where
FormatterTrait implements all methods that
core::fmt::Formatter currently does?
The standard library could then make the current
core::fmt::Formatter private and implement
FormatterTrait for it.
As far as I can see, this would allow custom formatters and wouldn't break any existing code.