pub enum ErrorKind {
TypeResolvingError(String),
TypeNotFound(String),
WrongShape {
actual: Kind,
expected_id: String,
},
WrongLength {
actual_len: usize,
expected_len: usize,
},
NumberOutOfRange {
value: String,
expected_id: String,
},
CannotFindVariant {
name: String,
expected_id: String,
},
CannotFindField {
name: String,
},
Custom(Box<dyn CustomError>),
}
Expand description
The underlying nature of the error.
Variants§
TypeResolvingError(String)
There was an error resolving the type via the given crate::TypeResolver
.
TypeNotFound(String)
Cannot find a given type.
WrongShape
Cannot encode the actual type given into the target type ID.
Fields
WrongLength
The types line up, but the expected length of the target type is different from the length of the input value.
NumberOutOfRange
We cannot encode the number given into the target type; it’s out of range.
Fields
CannotFindVariant
Cannot find a variant with a matching name on the target type.
Fields
CannotFindField
Cannot find a field on our source type that’s needed for the target type.
Custom(Box<dyn CustomError>)
A custom error.
Trait Implementations§
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