pub trait IntoOption<T> {
// Required method
fn into_option(self) -> Option<T>;
}Expand description
A type that can be converted into an Option<T>.
This trait exists to unify how Unwrapped abstracts implementations for
Result and Option. In the future, if the standard library implements
Into<Option<T>> for Result<T,E>, this trait can be removed.
Required Methods§
Sourcefn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Returns self as an option.