pub trait IntoOption<T>: Sized {
// Required method
fn into_option(self) -> T;
}Expand description
A trait for auto-wrapping a generic type T into Option<Y>,
where Y can be inferred from context.
(useful in macro helpers, such as NewDefaultV!)
Required Methods§
Sourcefn into_option(self) -> T
fn into_option(self) -> T
Performs the conversion.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".