OptionExt

Trait OptionExt 

Source
pub trait OptionExt<T> {
    // Required method
    fn contains_some<U>(&self, x: &U) -> bool
       where U: PartialEq<T>;
}
Expand description

Extension trait for Option<T>.

Required Methods§

Source

fn contains_some<U>(&self, x: &U) -> bool
where U: PartialEq<T>,

Checks if the Option contains the specified value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> OptionExt<T> for Option<T>

Source§

fn contains_some<U>(&self, x: &U) -> bool
where U: PartialEq<T>,

Implementors§