pub struct Expectation<E, A> {
pub expected: E,
pub actual: A,
}Expand description
Attachment that shows expected vs actual values.
This is useful for validation errors and mismatches where you want to clearly show what was expected versus what was actually received.
Fields§
§expected: EThe expected value
actual: AThe actual value that was received
Trait Implementations§
Auto Trait Implementations§
impl<E, A> Freeze for Expectation<E, A>
impl<E, A> RefUnwindSafe for Expectation<E, A>where
E: RefUnwindSafe,
A: RefUnwindSafe,
impl<E, A> Send for Expectation<E, A>
impl<E, A> Sync for Expectation<E, A>
impl<E, A> Unpin for Expectation<E, A>
impl<E, A> UnsafeUnpin for Expectation<E, A>where
E: UnsafeUnpin,
A: UnsafeUnpin,
impl<E, A> UnwindSafe for Expectation<E, A>where
E: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
impl<T> Attachment for T
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