usecore::{fmt::Display,ops::{
Add,
BitOr,},};/// 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.
pubtraitContexting<Atom>:
Sized + Add<Atom, Output = Self> + BitOr<Output = Self> + ProvideElement
{/// Create a new Context from a Atom.
/// Implementation should try to avoid allocate for only one Atom.
fnnew(atom: Atom)->Self;}/// This is an utily trait
pubtraitProvideElement{/// Element associate with a Context.
/// This is often an enum of different Atom.
typeElement: Display;/// return the last Element added to a Context
fnlast(&self)->&Self::Element;}