Skip to main content

ErrorFormatter

Trait ErrorFormatter 

Source
pub trait ErrorFormatter:
    Clone
    + Default
    + Send
    + Sync
    + 'static {
    // Provided method
    fn format_error(
        &self,
        error: &Error,
        shell: &Shell<impl ShellExtensions>,
    ) -> String { ... }
}
Expand description

Trait for defining shell error behaviors.

Provided Methods§

Source

fn format_error( &self, error: &Error, shell: &Shell<impl ShellExtensions>, ) -> String

Format the given error for display within the context of the provided shell.

§Arguments
  • error - The error to format
  • shell - The shell context in which the error occurred.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§