Skip to main content

IntoOption

Trait IntoOption 

Source
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§

Source

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".

Implementations on Foreign Types§

Source§

impl IntoOption<Option<Rc<dyn Fn(&Whatsit) -> Result<(Dimension, Dimension, Dimension), Error>>>> for &str

Source§

impl IntoOption<Option<Rc<dyn Fn(&Whatsit) -> Result<(Dimension, Dimension, Dimension), Error>>>> for i64

Source§

impl IntoOption<Option<Reversion>> for &str

Source§

impl IntoOption<Option<Scope>> for &str

Source§

impl IntoOption<Option<Scope>> for String

Source§

impl IntoOption<Option<String>> for &str

Source§

impl IntoOption<Option<bool>> for bool

Source§

impl IntoOption<Option<usize>> for usize

Source§

impl IntoOption<bool> for bool

Source§

impl<T> IntoOption<Option<T>> for Option<T>

Source§

impl<T> IntoOption<Option<Vec<T>>> for Vec<T>

Source§

impl<T> IntoOption<Option<VecDeque<T>>> for VecDeque<T>

Implementors§