Contains

Trait Contains 

Source
pub trait Contains<Q> {
    type Key;

    // Required method
    fn contains(&self, key: &Q) -> bool
       where Self::Key: Borrow<Q>;
}
Expand description

Contains defines a common interface for types able to verify if they contain a given key or index; the trait strives to emulate the behavior of the contains method found in standard collections such as HashSet or BTreeSet.

Required Associated Types§

Required Methods§

Source

fn contains(&self, key: &Q) -> bool
where Self::Key: Borrow<Q>,

checks if the container contains the given index

Implementors§

Source§

impl<S, K, Idx, Q> Contains<Q> for Link<S, K, Idx>
where Q: PartialEq, S: Domain<Idx>, K: GraphType, Idx: RawIndex + PartialEq, for<'a> &'a S: IntoIterator<Item = &'a VertexId<Idx>>,

Source§

impl<T, S, K, Idx, Q> Contains<Q> for Edge<T, S, K, Idx>
where Q: PartialEq, S: Domain<Idx>, K: GraphType, Idx: RawIndex + PartialEq, for<'a> &'a S: IntoIterator<Item = &'a VertexId<Idx>>,