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
Available on crate feature std
only.
impl Error for ErrorKind
Available on crate feature
std
only.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Assert
: 0 bytesToken
: 0 bytesTag
: 0 bytesAlt
: 0 bytesMany
: 0 bytesEof
: 0 bytesSlice
: 0 bytesComplete
: 0 bytesNot
: 0 bytesVerify
: 0 bytesFail
: 0 bytes