pub trait OptionExt<T> {
// Required methods
fn unwrap_logic(self) -> T;
fn and_then_logic<U>(self, f: Mapping<T, Option<U>>) -> Option<U>;
fn map_logic<U>(self, f: Mapping<T, U>) -> Option<U>;
}Required Methods§
Sourcefn unwrap_logic(self) -> T
fn unwrap_logic(self) -> T
Sourcefn and_then_logic<U>(self, f: Mapping<T, Option<U>>) -> Option<U>
fn and_then_logic<U>(self, f: Mapping<T, Option<U>>) -> Option<U>
Same as Option::and_then, but in logic.
logic ⚠
Sourcefn map_logic<U>(self, f: Mapping<T, U>) -> Option<U>
fn map_logic<U>(self, f: Mapping<T, U>) -> Option<U>
Same as Option::map, but in logic.
logic ⚠
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T> OptionExt<T> for Option<T>
impl<T> OptionExt<T> for Option<T>
Source§fn unwrap_logic(self) -> T
fn unwrap_logic(self) -> T
logic(open)
match self { Some(x) => x, None => any(), }
requires
self != None