Skip to main content

DisplayErrStack

Trait DisplayErrStack 

Source
pub trait DisplayErrStack {
    // Required method
    fn display_stack(&self) -> ErrStackDisplay<'_>;
}
Expand description

An extension trait for an Error enabling it to be displayed alongside its error stack using Error::source.

If aborting, consider using fail or die. Otherwise, this can be helpful in displaying warnings.

Required Methods§

Source

fn display_stack(&self) -> ErrStackDisplay<'_>

Returns a displayable representation of the error alongside its error stack using Error::source.

This using and two spaces of indent before each item, and includes a newline at the end.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl DisplayErrStack for dyn Error + 'static

Implementors§

Source§

impl<E> DisplayErrStack for E
where E: Error + 'static,