pub trait MessageFormatter: Send + Sync {
// Required method
fn format(&self, error: &Error) -> String;
}Expand description
Pluggable formatter for converting an Error into a
user-visible message.
Implement this trait to plug in localisation, simplification,
or rich formatting strategies. The trait is Send + Sync so a
single formatter instance can be shared across threads.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".