rust_sc2::units

Trait Container

Source
pub trait Container<T> {
    // Required method
    fn contains(&self, item: &T) -> bool;
}
Expand description

Joins collections functionality to check if given item is present in it. Used in generics of some units methods.

Required Methods§

Source

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

Returns true if item is present in the collection.

Implementations on Foreign Types§

Source§

impl<T: Eq + Hash> Container<T> for IndexSet<T>

Source§

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

Source§

impl<T: Eq + Hash, S: BuildHasher> Container<T> for HashSet<T, S>

Source§

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

Source§

impl<T: Eq + Hash, V> Container<T> for IndexMap<T, V>

Source§

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

Source§

impl<T: Eq + Hash, V, S: BuildHasher> Container<T> for HashMap<T, V, S>

Source§

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

Source§

impl<T: Ord> Container<T> for BTreeSet<T>

Source§

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

Source§

impl<T: Ord, V> Container<T> for BTreeMap<T, V>

Source§

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

Source§

impl<T: PartialEq> Container<T> for &[T]

Source§

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

Source§

impl<T: PartialEq> Container<T> for Vec<T>

Source§

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

Implementors§