Trait IntoErrorTree

Source
pub trait IntoErrorTree<L, E> {
    // Required method
    fn with_label(self, label: L) -> ErrorTree<L, E>;
}
Expand description

Adds a label to the error tree.

Required Methods§

Source

fn with_label(self, label: L) -> ErrorTree<L, E>

Adds a label to an error tree.

struct Error(String);
let leaf = ErrorTree::leaf(Error("a regular error".into()));
let labeled_leaf = leaf.with_label("the label");

Implementors§

Source§

impl<L, E> IntoErrorTree<L, E> for ErrorTree<L, E>

Source§

impl<L, E> IntoErrorTree<L, E> for E
where E: Into<ErrorTree<L, E>>,