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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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
impl<I, E> StructuralPartialEq for GreedyError<I, E>
Auto Trait Implementations§
impl<I, E> Freeze for GreedyError<I, E>
impl<I, E> RefUnwindSafe for GreedyError<I, E>where
I: RefUnwindSafe,
E: RefUnwindSafe,
impl<I, E> Send for GreedyError<I, E>
impl<I, E> Sync for GreedyError<I, E>
impl<I, E> Unpin for GreedyError<I, E>
impl<I, E> UnwindSafe for GreedyError<I, E>where
I: UnwindSafe,
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more