pub struct ShapeMismatchError {
pub expected: &'static Shape,
pub actual: &'static Shape,
}Expand description
Error returned when materializing a HeapValue to the wrong type.
This is separate from ReflectError because HeapValue operations
don’t have path context - they operate on already-constructed values.
Fields§
§expected: &'static ShapeThe shape that was expected (the target type).
actual: &'static ShapeThe shape that was actually found (the HeapValue’s shape).
Trait Implementations§
Source§impl Clone for ShapeMismatchError
impl Clone for ShapeMismatchError
Source§fn clone(&self) -> ShapeMismatchError
fn clone(&self) -> ShapeMismatchError
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 ShapeMismatchError
impl Debug for ShapeMismatchError
Source§impl Display for ShapeMismatchError
impl Display for ShapeMismatchError
Source§impl Error for ShapeMismatchError
impl Error for ShapeMismatchError
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 ShapeMismatchError
impl RefUnwindSafe for ShapeMismatchError
impl Send for ShapeMismatchError
impl Sync for ShapeMismatchError
impl Unpin for ShapeMismatchError
impl UnsafeUnpin for ShapeMismatchError
impl UnwindSafe for ShapeMismatchError
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