pub trait Contains<'a, T: Eq + Hash> {
    type Item: Borrow<T>;
    type Iter: Iterator<Item = Self::Item>;

    // Required methods
    fn contains(&self, key: &T) -> bool;
    fn contains_iter(&'a self) -> Self::Iter;
}

Required Associated Types§

source

type Item: Borrow<T>

source

type Iter: Iterator<Item = Self::Item>

Required Methods§

source

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

source

fn contains_iter(&'a self) -> Self::Iter

Implementations on Foreign Types§

source§

impl<'a, T: 'a + Eq + Hash, U: 'a> Contains<'a, T> for HashMap<T, U>

§

type Item = &'a T

§

type Iter = Keys<'a, T, U>

source§

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

source§

fn contains_iter(&'a self) -> Self::Iter

source§

impl<'a, T: 'a + Eq + Hash> Contains<'a, T> for HashSet<T>

§

type Item = &'a T

§

type Iter = Iter<'a, T>

source§

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

source§

fn contains_iter(&'a self) -> Self::Iter

Implementors§

source§

impl<'a, T: 'a + Eq + Hash + Copy> Contains<'a, T> for T

§

type Item = &'a T

§

type Iter = Once<&'a T>