Struct nom::error::VerboseError
source · [−]pub struct VerboseError<I> {
pub errors: Vec<(I, VerboseErrorKind)>,
}
Expand description
this error type accumulates errors and their position when backtracking
through a parse tree. With some post processing (cf examples/json.rs
),
it can be used to display user friendly error messages
Fields
errors: Vec<(I, VerboseErrorKind)>
list of errors accumulated by VerboseError
, containing the affected
part of input data, and some context
Trait Implementations
sourceimpl<I: Clone> Clone for VerboseError<I>
impl<I: Clone> Clone for VerboseError<I>
sourcefn clone(&self) -> VerboseError<I>
fn clone(&self) -> VerboseError<I>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<I: Debug> Debug for VerboseError<I>
impl<I: Debug> Debug for VerboseError<I>
sourceimpl<I> ParseError<I> for VerboseError<I>
impl<I> ParseError<I> for VerboseError<I>
sourcefn 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
sourcefn from_char(input: I, c: char) -> Self
fn from_char(input: I, c: char) -> Self
creates an error from an input position and an expected character
sourcefn add_context(input: I, ctx: &'static str, other: Self) -> Self
fn add_context(input: I, ctx: &'static str, other: Self) -> Self
sourceimpl<I: PartialEq> PartialEq<VerboseError<I>> for VerboseError<I>
impl<I: PartialEq> PartialEq<VerboseError<I>> for VerboseError<I>
sourcefn eq(&self, other: &VerboseError<I>) -> bool
fn eq(&self, other: &VerboseError<I>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VerboseError<I>) -> bool
fn ne(&self, other: &VerboseError<I>) -> bool
This method tests for !=
.
impl<I> StructuralPartialEq for VerboseError<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for VerboseError<I> where
I: RefUnwindSafe,
impl<I> Send for VerboseError<I> where
I: Send,
impl<I> Sync for VerboseError<I> where
I: Sync,
impl<I> Unpin for VerboseError<I> where
I: Unpin,
impl<I> UnwindSafe for VerboseError<I> where
I: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more