pub enum ParseErrorKind {
Show 15 variants
UnexpectedUninitialized,
TypeMismatch {
expected: ValueKind,
actual: ValueKind,
},
MissingField(String),
MissingExtension(String),
UnknownVariant(String),
OutOfRange(String),
InvalidPattern {
pattern: String,
value: String,
},
Nested {
path: String,
source: Box<ParseErrorKind>,
},
InvalidIdentifier(IdentifierError),
UnexpectedTupleLength {
expected: usize,
actual: usize,
},
UnknownField(String),
InvalidKeyType(ObjectKey),
NoMatchingVariant,
AmbiguousUnion(Vec<String>),
LiteralMismatch {
expected: Box<Value>,
actual: Box<Value>,
},
}Expand description
Error type for parsing failures.
Variants§
UnexpectedUninitialized
Unexpected uninitialized value.
TypeMismatch
Type mismatch between expected and actual value.
MissingField(String)
Required field is missing.
MissingExtension(String)
Required extension is missing.
UnknownVariant(String)
Unknown variant in a union type.
OutOfRange(String)
Value is out of valid range.
InvalidPattern
Invalid string pattern.
Nested
Nested parse error with path context.
InvalidIdentifier(IdentifierError)
Invalid identifier.
UnexpectedTupleLength
Unexpected tuple length.
UnknownField(String)
Unknown field in record.
InvalidKeyType(ObjectKey)
Invalid key type in record (expected string).
NoMatchingVariant
No variant matched in union type.
AmbiguousUnion(Vec<String>)
Multiple variants matched with no priority to resolve.
LiteralMismatch
Literal value mismatch.
Implementations§
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§fn clone(&self) -> ParseErrorKind
fn clone(&self) -> ParseErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
Source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
Source§impl Error for ParseErrorKind
impl Error for ParseErrorKind
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 From<IdentifierError> for ParseErrorKind
impl From<IdentifierError> for ParseErrorKind
Source§fn from(source: IdentifierError) -> Self
fn from(source: IdentifierError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ParseErrorKind
impl PartialEq 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 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