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§
Sourcefn contains_some<U>(&self, x: &U) -> boolwhere
U: PartialEq<T>,
fn contains_some<U>(&self, x: &U) -> boolwhere
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.