pub trait ContextError<I, C = &'static str>: Sized {
    // Provided method
    fn add_context(self, _input: I, _ctx: C) -> Self { ... }
}
Expand description

Used by Parser::context to add custom data to error while backtracking

May be implemented multiple times for different kinds of context.

Provided Methods§

source

fn add_context(self, _input: I, _ctx: C) -> Self

Append 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

Implementations on Foreign Types§

source§

impl<I, C> ContextError<I, C> for ()

Implementors§

source§

impl<I> ContextError<I, &'static str> for VerboseError<I>

source§

impl<I, C> ContextError<I, C> for Error<I>