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§
Sourcefn with_label(self, label: L) -> ErrorTree<L, E>
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");