Trait scsys_core::specs::Contain

source ·
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 { ... } }
Expand description

Interface for data-structures that can be compared for equality

Required Methods§

source

fn contains(&self, elem: &T) -> bool

Contain::contains returns true if the given element is in the Contain instance

Provided Methods§

source

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

source

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

Object Safety§

This trait is not object safe.

Implementors§