pub struct Error<I> {
    pub input: I,
    pub code: ErrorKind,
}Expand description
default error type, only contains the error’ location and code
Fields
input: Iposition of the error in the input data
code: ErrorKindnom error code
Implementations
Trait Implementations
sourceimpl<I> ContextError<I> for Error<I>
 
impl<I> ContextError<I> for Error<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: Display> Display for Error<I>
 
impl<I: Display> Display for Error<I>
The Display implementation allows the std::error::Error implementation
sourceimpl<I: Debug + Display> Error for Error<I>
 
impl<I: Debug + Display> Error for Error<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
1.0.0 · sourcefn description(&self) -> &str
 
fn description(&self) -> &str
👎 Deprecated since 1.42.0: 
use the Display impl or to_string()
sourceimpl<I> ErrorConvert<Error<(I, usize)>> for Error<I>
 
impl<I> ErrorConvert<Error<(I, usize)>> for Error<I>
sourceimpl<I> ErrorConvert<Error<I>> for Error<(I, usize)>
 
impl<I> ErrorConvert<Error<I>> for Error<(I, usize)>
sourceimpl<I, E> FromExternalError<I, E> for Error<I>
 
impl<I, E> FromExternalError<I, E> for Error<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 Error<I>
 
impl<I> ParseError<I> for Error<I>
impl<I> StructuralPartialEq for Error<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for Error<I> where
    I: RefUnwindSafe, 
impl<I> Send for Error<I> where
    I: Send, 
impl<I> Sync for Error<I> where
    I: Sync, 
impl<I> Unpin for Error<I> where
    I: Unpin, 
impl<I> UnwindSafe for Error<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