pub enum ConvertError {
Tlv(String),
TooDeep,
Mismatch {
path: String,
expected: &'static str,
got: String,
},
UnknownField {
path: String,
field: String,
structure: &'static str,
},
MissingField {
path: String,
field: &'static str,
},
}Expand description
Why a conversion failed.
Variants§
Tlv(String)
The TLV is malformed, or the writer ran out of room.
TooDeep
The value is nested deeper than MAX_DEPTH.
Mismatch
The JSON value does not fit the expected type.
Fields
UnknownField
A structure field the schema does not have.
Fields
MissingField
A required field is missing.
Trait Implementations§
Source§impl Debug for ConvertError
impl Debug for ConvertError
Source§impl Display for ConvertError
impl Display for ConvertError
impl Eq for ConvertError
Source§impl Error for ConvertError
impl Error for ConvertError
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()
Source§impl PartialEq for ConvertError
impl PartialEq for ConvertError
impl StructuralPartialEq for ConvertError
Auto Trait Implementations§
impl Freeze for ConvertError
impl RefUnwindSafe for ConvertError
impl Send for ConvertError
impl Sync for ConvertError
impl Unpin for ConvertError
impl UnsafeUnpin for ConvertError
impl UnwindSafe for ConvertError
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
§impl<T> Init<T> for T
impl<T> Init<T> for T
§impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
§fn into_fallible<E>(self) -> impl Init<T, E>
fn into_fallible<E>(self) -> impl Init<T, E>
Convert the infallible initializer to a fallible one.