pub struct Mismatch {
pub expected: Description,
pub actual: String,
pub diff: Option<String>,
}Expand description
Why a value failed a matcher: what was expected, what was found, and an optional diff between the two.
Fields§
§expected: DescriptionThe matcher’s expectation, as a composable Description.
actual: StringThe Debug rendering of the actual value.
diff: Option<String>An optional pre-rendered diff between expected and actual. None when
no diff is available.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mismatch
impl RefUnwindSafe for Mismatch
impl Send for Mismatch
impl Sync for Mismatch
impl Unpin for Mismatch
impl UnsafeUnpin for Mismatch
impl UnwindSafe for Mismatch
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