Trait AddContext
trait AddContext<I: Stream, C = &'static str>: Sized
Used by Parser::context to add custom data to error while backtracking
May be implemented multiple times for different kinds of context.
Provided Methods
fn add_context(self: Self, _input: &I, _token_start: &<I as Stream>::Checkpoint, _context: C) -> SelfAppend to an existing error custom data
This is used mainly by
Parser::context, to add user friendly information to errors when backtracking through a parse tree
Implementors
impl<I: Stream, C> AddContext for EmptyErrorimpl<C, I: Stream> AddContext for ContextError<C>impl<I: Stream, C> AddContext for ()impl<I: Stream + Clone, C> AddContext for InputError<I>impl<I: Stream, C, E: AddContext<I, C>> AddContext for ErrMode<E>