Trait 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 { ... } }

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

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.

Implementors§

Source§

impl<N, V> Contain<(N, V)> for Entry<N, V>
where N: PartialEq, V: PartialEq,

Source§

impl<N, V> Contain<Edge<N, V>> for DirectedGraph<N, V>
where N: Node, V: Weight,

Source§

impl<N, V> Contain<Edge<N, V>> for UndirectedGraph<N, V>
where N: Node, V: Weight,

Source§

impl<N, V> Contain<N> for DirectedGraph<N, V>
where N: Node, V: Weight,

Source§

impl<N, V> Contain<N> for UndirectedGraph<N, V>
where N: Node, V: Weight,

Source§

impl<N: Node> Contain<N> for BreadthFirstSearch<N>

Source§

impl<N: Node> Contain<N> for DepthFirstSearch<N>