pub trait IntoOption<T> {
// Required method
fn into_option(self) -> Option<T>;
}Expand description
Converts Self to an Option<T>, either Some(T) if able or None
Required Methods§
Sourcefn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Return self as an Option<T>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".