pub trait Contain<T>where
T: PartialEq,{
// Required method
fn contains(&self, elem: &T) -> bool;
// Provided methods
fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool { ... }
fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool { ... }
}
Required Methods§
Provided Methods§
Sourcefn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool
fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool
Contain::contains_all returns true if all elements in the given iterator are in the Contain instance
Sourcefn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool
fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool
Contain::contains_some returns true if any element in the given iterator is in the Contain instance
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.