Trait binator::Contexting

source ·
pub trait Contexting<Atom>: Sized + Add<Atom, Output = Self> + BitOr<Output = Self> + ProvideElement {
    // Required method
    fn new(atom: Atom) -> Self;
}
Expand description

Contexting is a trait used to report failure and error. This idea is too have a tree of context that will help final user to understand the error. It’s can also help for debugging purpose.

Required Methods§

source

fn new(atom: Atom) -> Self

Create a new Context from a Atom. Implementation should try to avoid allocate for only one Atom.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Atom> Contexting<Atom> for Ignore

source§

impl<Behavior, Context: Display, Atom: Into<Context>, const N: usize> Contexting<Atom> for Stack<Behavior, Context, N>
where Self: Add<Atom, Output = Self> + BitOr<Output = Self>,

source§

impl<Behavior, Element: Display, Atom: Into<Element>> Contexting<Atom> for Keep<Behavior, Element>
where Self: Add<Atom, Output = Self> + BitOr<Output = Self>,

source§

impl<Context: Display, Atom: Into<Context>> Contexting<Atom> for Tree<Context>