pub enum FieldError {
NoSuchField,
IndexOutOfBounds {
index: usize,
bound: usize,
},
TypeMismatch {
expected: &'static Shape,
actual: &'static Shape,
},
Unsized,
}
Expand description
Errors encountered when calling field_by_index
or field_by_name
Variants§
NoSuchField
field_by_name
was called on a struct, and there is no static field
with the given key.
IndexOutOfBounds
field_by_index
was called on a fixed-size collection (like a tuple,
a struct, or a fixed-size array) and the index was out of bounds.
TypeMismatch
set
or set_by_name
was called with an mismatched type
Fields
Unsized
The type is unsized
Trait Implementations§
Source§impl Clone for FieldError
impl Clone for FieldError
Source§fn clone(&self) -> FieldError
fn clone(&self) -> FieldError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FieldError
impl Debug for FieldError
Source§impl Display for FieldError
impl Display for FieldError
Source§impl Error for FieldError
impl Error for FieldError
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 FieldError
impl PartialEq for FieldError
impl Copy for FieldError
impl Eq for FieldError
impl StructuralPartialEq for FieldError
Auto Trait Implementations§
impl Freeze for FieldError
impl RefUnwindSafe for FieldError
impl Send for FieldError
impl Sync for FieldError
impl Unpin for FieldError
impl UnwindSafe for FieldError
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