pub enum ParseErrorKind {
UnexpectedEof,
ExpectingEof,
InvalidTag,
InvalidChoice,
InvalidLength,
LengthMismatch,
PredicateFailed,
CondRejected,
NonCanonical,
Overflow,
RecursionLimitExceeded,
Custom(&'static str),
}Expand description
The coarse-grained kind of parse failure.
Variants§
UnexpectedEof
The parser needed more input bytes.
ExpectingEof
The parser expected the end of input, but more bytes were present.
InvalidTag
A tag or discriminant byte sequence was invalid.
InvalidChoice
Input did not match any branch of a choice-like format.
InvalidLength
A parsed length field was invalid.
LengthMismatch
A computed length disagreed with the enclosing format.
PredicateFailed
A refinement predicate or semantic check failed.
CondRejected
A branch was rejected after partial inspection.
NonCanonical
A non-canonical representation was observed.
Overflow
An integer or size computation overflowed.
RecursionLimitExceeded
Recursion limit exceeded.
Custom(&'static str)
A custom error message.
Implementations§
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
Source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
Source§impl PartialEq for ParseErrorKind
impl PartialEq for ParseErrorKind
Source§fn eq(&self, other: &ParseErrorKind) -> bool
fn eq(&self, other: &ParseErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ParseErrorKind
impl Eq for ParseErrorKind
impl StructuralPartialEq for ParseErrorKind
Auto Trait Implementations§
impl Freeze for ParseErrorKind
impl RefUnwindSafe for ParseErrorKind
impl Send for ParseErrorKind
impl Sync for ParseErrorKind
impl Unpin for ParseErrorKind
impl UnsafeUnpin for ParseErrorKind
impl UnwindSafe for ParseErrorKind
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