Trait BoxedErrorExt

Source
pub trait BoxedErrorExt<E: ?Sized>: BoxedSealed + Sized {
    // Required methods
    fn context<M: Display>(self, msg: M) -> BoxContext<M, E>;
    fn chain(&self) -> Chain<'_> ;

    // Provided methods
    fn find_source<T: Error + 'static>(&self) -> Option<&T> { ... }
    fn display<S: Display>(&self, separator: S) -> DisplayChain<'_, S> { ... }
}
Expand description

An equivalent of ErrorExt for boxed errors.

This is effectively the same trait as ErrorExt, but for boxed errors. It exists separately purely for implementation reasons.

Required Methods§

Source

fn context<M: Display>(self, msg: M) -> BoxContext<M, E>

Equivalent of ErrorExt::context.

Source

fn chain(&self) -> Chain<'_>

Equivalent of ErrorExt::chain.

Provided Methods§

Source

fn find_source<T: Error + 'static>(&self) -> Option<&T>

Equivalent of ErrorExt::find_source.

Source

fn display<S: Display>(&self, separator: S) -> DisplayChain<'_, S>

Equivalent of ErrorExt::display.

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.

Implementations on Foreign Types§

Source§

impl BoxedErrorExt<dyn Error + Send + Sync> for Box<dyn Error + Send + Sync>

Source§

fn context<M: Display>(self, msg: M) -> BoxContext<M, dyn Error + Send + Sync>

Source§

fn chain(&self) -> Chain<'_>

Source§

impl BoxedErrorExt<dyn Error + Send> for Box<dyn Error + Send>

Source§

fn context<M: Display>(self, msg: M) -> BoxContext<M, dyn Error + Send>

Source§

fn chain(&self) -> Chain<'_>

Source§

impl BoxedErrorExt<dyn Error + Sync> for Box<dyn Error + Sync>

Source§

fn context<M: Display>(self, msg: M) -> BoxContext<M, dyn Error + Sync>

Source§

fn chain(&self) -> Chain<'_>

Source§

impl BoxedErrorExt<dyn Error> for Box<dyn Error>

Source§

fn context<M: Display>(self, msg: M) -> BoxContext<M, dyn Error>

Source§

fn chain(&self) -> Chain<'_>

Implementors§