pub trait Assertion:
Debug
+ Display
+ Termination {
// Required method
fn test(&self) -> bool;
// Provided methods
fn should_fail(self) -> ShouldFail<Self>
where Self: Sized { ... }
fn unwrap(&self) { ... }
}Expand description
An assertion that has been made about some object.
Required Methods§
Provided Methods§
Sourcefn should_fail(self) -> ShouldFail<Self>where
Self: Sized,
fn should_fail(self) -> ShouldFail<Self>where
Self: Sized,
Wrap the assertion in ShouldFail, inverting its condition.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".