pub trait AssertOption {
// Required methods
fn is_some(self) -> Self;
fn is_none(self) -> Self;
}Expand description
Assert whether a subject of the Option type holds some value or has none.
§Examples
use asserting::prelude::*;
let subject = Some("nisl possim nobis non".to_string());
assert_that!(subject).is_some();
#[derive(Debug)]
struct MyType;
let subject: Option<MyType> = None;
assert_that!(subject).is_none();Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.