pub trait ErrorFormatter: Send + Sync {
// Required method
fn format_error(&self, error: &Error) -> Cow<'_, str>;
}Expand description
Formats an error into a user-facing description. This allows extracted components to present consistent error messaging without depending on the CLI presentation layer.
Required Methods§
Sourcefn format_error(&self, error: &Error) -> Cow<'_, str>
fn format_error(&self, error: &Error) -> Cow<'_, str>
Render the error into a user-facing string.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".