Skip to main content

ErrorChainExt

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".

Implementors§

Source§

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