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 Error + Send + Sync + 'static>),
}
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 Error + Send + Sync + 'static>)
A custom error.
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
1.30.0 · 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()
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