display_error_chain

Trait ErrorChainExt

source
pub trait ErrorChainExt {
    // Required methods
    fn chain(&self) -> DisplayErrorChain<&Self>;
    fn into_chain(self) -> DisplayErrorChain<Self>
       where Self: Sized;
}
Expand description

An extension trait for Error types to display their sources in a chain.

Required Methods§

source

fn chain(&self) -> DisplayErrorChain<&Self>

Provides an fmt::Display implementation for an error as a chain.

source

fn into_chain(self) -> DisplayErrorChain<Self>
where Self: Sized,

Same as chain, but consumes self.

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§

source§

impl<E> ErrorChainExt for E
where E: Error,