pub trait OptionAssertion<T> {
// Required method
fn contain(self, expected: &T) -> Self;
}Expand description
Containment assertion for Option.
This lives on a trait rather than being an inherent method for the same
coherence reason as [CollectionAssertion]: an inherent contain on
Assertion<Option<T>> would clash with the inherent contain from the
impl<T: AsRef<str>> Assertion<T> string assertions, because coherence
cannot rule out a future AsRef<str> impl for Option<_>.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".