#[non_exhaustive]pub enum JsonDecodeErrorKind {
UnexpectedType,
MissingField,
Number,
}Expand description
The kind of a typed-JSON decoding error.
#[non_exhaustive]: new kinds may be added in a future release.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedType
A value had a different JSON type than the target expected.
MissingField
A required object field was missing.
Number
A number could not be represented by the target type.
Trait Implementations§
Source§impl Clone for JsonDecodeErrorKind
impl Clone for JsonDecodeErrorKind
Source§fn clone(&self) -> JsonDecodeErrorKind
fn clone(&self) -> JsonDecodeErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JsonDecodeErrorKind
Source§impl Debug for JsonDecodeErrorKind
impl Debug for JsonDecodeErrorKind
impl Eq for JsonDecodeErrorKind
Source§impl PartialEq for JsonDecodeErrorKind
impl PartialEq for JsonDecodeErrorKind
Source§fn eq(&self, other: &JsonDecodeErrorKind) -> bool
fn eq(&self, other: &JsonDecodeErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JsonDecodeErrorKind
Auto Trait Implementations§
impl Freeze for JsonDecodeErrorKind
impl RefUnwindSafe for JsonDecodeErrorKind
impl Send for JsonDecodeErrorKind
impl Sync for JsonDecodeErrorKind
impl Unpin for JsonDecodeErrorKind
impl UnsafeUnpin for JsonDecodeErrorKind
impl UnwindSafe for JsonDecodeErrorKind
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