Trait FlattenOptionRefOption

pub trait FlattenOptionRefOption {
    type Value;

    // Required method
    fn flatten(&self) -> Option<&Self::Value>;
}
Expand description

Helper trait to implement flatten() on Option<&Option<T>>.

Required Associated Types§

type Value

The type of the value contained in the double option.

Required Methods§

fn flatten(&self) -> Option<&Self::Value>

Converts from Option<&Option<T>> to Option<&T>.

Implementors§

§

impl<'a, T> FlattenOptionRefOption for Option<&'a Option<T>>

§

type Value = T