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> ContextError<I> for VerboseError<I>
impl<I> ContextError<I> for VerboseError<I>
sourcefn add_context(input: I, ctx: &'static str, other: Self) -> Self
fn add_context(input: I, ctx: &'static str, other: Self) -> Self
sourceimpl<I: Debug> Debug for VerboseError<I>
impl<I: Debug> Debug for VerboseError<I>
sourceimpl<I: Display> Display for VerboseError<I>
impl<I: Display> Display for VerboseError<I>
sourceimpl<I: Debug + Display> Error for VerboseError<I>
impl<I: Debug + Display> Error for VerboseError<I>
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<I> ErrorConvert<VerboseError<(I, usize)>> for VerboseError<I>
impl<I> ErrorConvert<VerboseError<(I, usize)>> for VerboseError<I>
sourcefn convert(self) -> VerboseError<(I, usize)>
fn convert(self) -> VerboseError<(I, usize)>
Transform to another error type
sourceimpl<I> ErrorConvert<VerboseError<I>> for VerboseError<(I, usize)>
impl<I> ErrorConvert<VerboseError<I>> for VerboseError<(I, usize)>
sourcefn convert(self) -> VerboseError<I>
fn convert(self) -> VerboseError<I>
Transform to another error type
sourceimpl<I, E> FromExternalError<I, E> for VerboseError<I>
impl<I, E> FromExternalError<I, E> for VerboseError<I>
sourcefn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
Create a new error from an input position and an external error
sourceimpl<I> ParseError<I> for VerboseError<I>
impl<I> ParseError<I> for VerboseError<I>
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