Trait kparse::ErrOrNomErr

source ·
pub trait ErrOrNomErr {
    type WrappedError: Debug;

    // Required method
    fn wrap(self) -> Err<Self::WrappedError>;
}
Expand description

This trait is used for Track.err() where the function wants to accept both E and nom::Err<E>.

Required Associated Types§

source

type WrappedError: Debug

The base error type.

Required Methods§

source

fn wrap(self) -> Err<Self::WrappedError>

Converts self to a nom::Err wrapped error.

Implementations on Foreign Types§

source§

impl<C, I> ErrOrNomErr for Err<ParserError<C, I>>where C: Code, I: Clone + Debug + SpanFragment + InputTake + InputLength + InputIter,

§

type WrappedError = ParserError<C, I>

source§

fn wrap(self) -> Err<Self::WrappedError>

source§

impl<C, I> ErrOrNomErr for Err<TokenizerError<C, I>>where C: Code, I: Clone + Debug + SpanFragment + InputTake + InputLength + InputIter,

Implementors§