Struct nom_greedyerror::GreedyError
source · pub struct GreedyError<I, E> {
pub errors: Vec<(I, GreedyErrorKind<E>)>,
}
Expand description
This error type accumulates errors and their position when backtracking
through a parse tree. This take a deepest error at alt
combinator.
Fields§
§errors: Vec<(I, GreedyErrorKind<E>)>
list of errors accumulated by GreedyError
, containing the affected
part of input data, and some context
Trait Implementations§
source§impl<I: Clone, E: Clone> Clone for GreedyError<I, E>
impl<I: Clone, E: Clone> Clone for GreedyError<I, E>
source§fn clone(&self) -> GreedyError<I, E>
fn clone(&self) -> GreedyError<I, E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<I> ContextError<I> for GreedyError<I, ErrorKind>where
I: Position,
impl<I> ContextError<I> for GreedyError<I, ErrorKind>where I: Position,
source§fn add_context(input: I, ctx: &'static str, other: Self) -> Self
fn add_context(input: I, ctx: &'static str, 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
source§impl<I> ParseError<I> for GreedyError<I, ErrorKind>where
I: Position,
impl<I> ParseError<I> for GreedyError<I, ErrorKind>where I: Position,
source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(input: I, kind: ErrorKind, other: Self) -> Self
fn append(input: I, kind: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
source§impl<I: PartialEq, E: PartialEq> PartialEq<GreedyError<I, E>> for GreedyError<I, E>
impl<I: PartialEq, E: PartialEq> PartialEq<GreedyError<I, E>> for GreedyError<I, E>
source§fn eq(&self, other: &GreedyError<I, E>) -> bool
fn eq(&self, other: &GreedyError<I, E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.