Trait nom8::error::ContextError

source ·
pub trait ContextError<I, C>: Sized {
    // Provided method
    fn add_context(_input: I, _ctx: C, other: Self) -> Self { ... }
}
Expand description

This trait is required by the context combinator to add a static string to an existing error

Provided Methods§

source

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

Creates a new error from an input position, a static string and an existing error. This is used mainly in the context combinator, 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 (I, ErrorKind)

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>