pub enum FromSchemaError {
ShapeMismatch {
expected: String,
actual: String,
context: String,
},
OutOfRange {
index: u32,
len: u32,
context: String,
},
UnknownUnionTag(String),
Custom(String),
}Expand description
Errors produced by FromSchema::from_value.
Variants§
ShapeMismatch
The expected value shape does not match what was provided.
OutOfRange
A variant or enum case index is out of range.
UnknownUnionTag(String)
A union tag was not matched by any branch.
Custom(String)
Free-form error message produced by generated decoders.
Implementations§
Trait Implementations§
Source§impl Clone for FromSchemaError
impl Clone for FromSchemaError
Source§impl Debug for FromSchemaError
impl Debug for FromSchemaError
Source§impl Display for FromSchemaError
impl Display for FromSchemaError
impl Eq for FromSchemaError
Source§impl Error for FromSchemaError
impl Error for FromSchemaError
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 FromSchemaError
impl PartialEq for FromSchemaError
impl StructuralPartialEq for FromSchemaError
Auto Trait Implementations§
impl Freeze for FromSchemaError
impl RefUnwindSafe for FromSchemaError
impl Send for FromSchemaError
impl Sync for FromSchemaError
impl Unpin for FromSchemaError
impl UnsafeUnpin for FromSchemaError
impl UnwindSafe for FromSchemaError
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