pub struct Panic { /* private fields */ }Expand description
Panic mode. When an assertion fails, a panic message is raised and the program terminates immediately.
Subsequent assertions after a failure are therefore not executed.
This is the default mode and allows an AssertThat to be mapped to a different type with a condition,
failing when that condition cannot be met.
A good example for that is assert_that(Err("foo")).is_err().is_equal_to("foo"), where the is_err
implementation can map the contained actual value to the results error value and allow for simpler chaining of assertions.
Trait Implementations§
impl StructuralPartialEq for Panic
Auto Trait Implementations§
impl Freeze for Panic
impl RefUnwindSafe for Panic
impl Send for Panic
impl Sync for Panic
impl Unpin for Panic
impl UnwindSafe for Panic
Blanket Implementations§
Source§impl<T> AssertingThat for T
impl<T> AssertingThat for T
fn assert_that<'t, U>(self, map: impl Fn(T) -> U) -> AssertThat<'t, U, Panic>
fn assert_that_it<'t>(self) -> AssertThat<'t, T, Panic>
Source§impl<Rhs, T> AssertrPartialEq<Rhs> for T
impl<Rhs, T> AssertrPartialEq<Rhs> 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