pub trait StdErrorExt
where Self: StdError,
{ // Provided methods fn as_chain(&self) -> String { ... } fn into_boxed(self) -> BoxError where Self: Sized + Send + Sync + 'static { ... } }

Provided Methods§

source

fn as_chain(&self) -> String

Format this error as a chain of colon separated strings built from this error and all recursive sources.

Can be used to log errors like this:

error!(error = error.as_chain(), "cannot do this or that");

source

fn into_boxed(self) -> BoxError
where Self: Sized + Send + Sync + 'static,

Converts this error – given it implements Sized + Send +Sync and 'static – into a BoxError.

Implementors§

source§

impl<T> StdErrorExt for T
where T: StdError,