pub(super) enum ErrorKind {
Custom(String),
DuplicateField(String),
MissingField(String),
UnsupportedShape {
observed: String,
expected: Option<String>,
},
UnknownField(ErrorUnknownField),
UnexpectedFormat(String),
UnexpectedType(String),
UnknownValue(String),
TooFewItems(usize),
TooManyItems(usize),
Multiple(Vec<Error>),
// some variants omitted
}
Variants§
Custom(String)
An arbitrary error message.
DuplicateField(String)
MissingField(String)
UnsupportedShape
UnknownField(ErrorUnknownField)
UnexpectedFormat(String)
UnexpectedType(String)
UnknownValue(String)
TooFewItems(usize)
TooManyItems(usize)
Multiple(Vec<Error>)
A set of errors.
Implementations§
Trait Implementations§
source§impl From<ErrorUnknownField> for ErrorKind
impl From<ErrorUnknownField> for ErrorKind
source§fn from(err: ErrorUnknownField) -> Self
fn from(err: ErrorUnknownField) -> Self
Converts to this type from the input type.
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)