Skip to main content

ErrorFormatter

Trait ErrorFormatter 

pub trait ErrorFormatter: Sized {
    // Required method
    fn format_error(error: &Error<Self>) -> StyledStr;
}
Expand description

Defines how to format an error for displaying to the user

Required Methods§

fn format_error(error: &Error<Self>) -> StyledStr

Stylize the error for the terminal

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl ErrorFormatter for KindFormatter

§

impl ErrorFormatter for RichFormatter

Available on crate feature error-context only.