Trait AsErrTree

Source
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§

Source

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.
Source§

fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))

Source§

impl AsErrTree for Report

Available on crate feature eyre only.
Source§

fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))

Source§

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.

Source§

fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))

Source§

impl<T: ?Sized + AsErrTree> AsErrTree for &T

Source§

fn as_err_tree(&self, func: &mut dyn FnMut(ErrTree<'_>))

Implementors§