pub trait OptionExtractAssertions<'t, T> {
// Required method
fn is_some(self) -> AssertThat<'t, T, Panic>
where T: Debug;
}Expand description
Data-extracting assertion for Option values.
Required Methods§
Sourcefn is_some(self) -> AssertThat<'t, T, Panic>where
T: Debug,
fn is_some(self) -> AssertThat<'t, T, Panic>where
T: Debug,
Test if this option is of the Some variant.
This is a terminal operation on the contained Option,
as there is nothing meaningful to do with the option if its variant was ensured.
This allows you to chain additional expectations on the contained success value.
Only available in Panic mode, as the extracted T cannot be produced when the value is
None. Use OptionAssertions::is_some_satisfying for capture mode.