pub enum ErrorKind {
Assert,
Token,
Tag,
Alt,
Many,
Eof,
Slice,
Complete,
Not,
Verify,
Fail,
}
Expand description
Provide some minor debug context for errors
Variants§
Implementations§
Trait Implementations§
source§impl<I: Stream, C> AddContext<I, C> for ErrorKind
impl<I: Stream, C> AddContext<I, C> for ErrorKind
source§fn add_context(
self,
_input: &I,
_token_start: &<I as Stream>::Checkpoint,
_context: C,
) -> Self
fn add_context( self, _input: &I, _token_start: &<I as Stream>::Checkpoint, _context: C, ) -> Self
Append to an existing error custom data Read more
source§impl Display for ErrorKind
impl Display for ErrorKind
The Display implementation allows the std::error::Error
implementation
source§impl Error for ErrorKind
impl Error for ErrorKind
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 ErrorKind
impl<I, E> FromExternalError<I, E> for ErrorKind
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
source§impl<I: Stream> ParserError<I> for ErrorKind
impl<I: Stream> ParserError<I> for ErrorKind
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(
self,
_input: &I,
_token_start: &<I as Stream>::Checkpoint,
_kind: ErrorKind,
) -> Self
fn append( self, _input: &I, _token_start: &<I as Stream>::Checkpoint, _kind: ErrorKind, ) -> Self
Like
ParserError::from_error_kind
but merges it with the existing error. Read moresource§impl PartialEq for ErrorKind
impl PartialEq for ErrorKind
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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