Trait IsOption

Source
pub trait IsOption: Sealed {
    type Item;

    // Required method
    fn into_option(self) -> Option<Self::Item>;
}
Expand description

A helper trait enforcing that the type is Option.

Required Associated Types§

Source

type Item

The type of inner value.

Required Methods§

Source

fn into_option(self) -> Option<Self::Item>

Consume itself and get the value of Option.

Implementations on Foreign Types§

Source§

impl<T> IsOption for Option<T>

Source§

type Item = T

Source§

fn into_option(self) -> Option<Self::Item>

Implementors§