pub trait AsErrTree {
// Required method
fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>));
}Expand description
Defines an Error’s temporary view as an ErrTree for printing.
This can be defined with err_tree, manually (see ErrTree), or with
the default dyn implementation. The dyn implementation does not track
any more information than standard library errors or track multiple sources.
Implementors must call func with a properly constructed ErrTree.
Required Methods§
Sourcefn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))
fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))
Constructs the ErrTree internally and calls func on it.
Implementations on Foreign Types§
Source§impl AsErrTree for Error
Available on crate feature anyhow only.
impl AsErrTree for Error
Available on crate feature
anyhow only.fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))
Source§impl AsErrTree for Report
Available on crate feature eyre only.
impl AsErrTree for Report
Available on crate feature
eyre only.fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))
Source§impl AsErrTree for dyn Error
Displays with Error::source as the child.
impl AsErrTree for dyn Error
Displays with Error::source as the child.
Does not provide any of the extra tracking information or handle multiple sources.