pub struct Error<I> {
pub input: I,
pub kind: ErrorKind,
}
Expand description
Default error type, only contains the error’ location and kind
This is a low-overhead error that only provides basic information. For less overhead, see
()
. Fore more information, see VerboseError
.
:w
Note: context and inner errors (like from Parser::map_res
) will be
dropped.
Fields§
§input: I
The input stream, pointing to the location where the error occurred
kind: ErrorKind
A rudimentary error kind
Implementations§
Trait Implementations§
source§impl<I, C> ContextError<I, C> for Error<I>
impl<I, C> ContextError<I, C> for Error<I>
source§fn add_context(self, _input: I, _ctx: C) -> Self
fn add_context(self, _input: I, _ctx: C) -> Self
Append to an existing error custom data Read more
source§impl<I: Display> Display for Error<I>
impl<I: Display> Display for Error<I>
The Display implementation allows the std::error::Error
implementation
source§impl<I: Debug + Display + Sync + Send + 'static> Error for Error<I>
impl<I: Debug + Display + Sync + Send + 'static> Error for Error<I>
1.30.0 · source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<I, E> FromExternalError<I, E> for Error<I>
impl<I, E> FromExternalError<I, E> for Error<I>
source§fn 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