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
The Display implementation allows the std::error::Error
implementation
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)>
Returns 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 moreimpl 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