[][src]Trait rs_graph::collections::ItemSet

pub trait ItemSet<I> where
    I: Copy
{ fn len(&self) -> usize;
fn clear(&mut self);
fn insert(&mut self, u: I) -> bool;
fn remove(&mut self, u: I) -> bool;
fn contains(&self, u: I) -> bool; fn is_empty(&self) -> bool { ... } }

A (finite) set of items (node or edges) of a graph.

Required methods

fn len(&self) -> usize

Return the number of items in this set.

fn clear(&mut self)

Remove all nodes from the set.

fn insert(&mut self, u: I) -> bool

Add one item to the set.

Return true iff u had not been contained in this set before.

fn remove(&mut self, u: I) -> bool

Remove one item from the set.

Returns true if the item had been contained in the set, otherwise false.

fn contains(&self, u: I) -> bool

Return true iff item u is contained in this set.

Loading content...

Provided methods

fn is_empty(&self) -> bool

Return true if this set is empty.

Loading content...

Implementations on Foreign Types

impl<'a, N, S> ItemSet<N> for &'a mut S where
    S: ItemSet<N>,
    N: Copy
[src]

impl<N, B> ItemSet<N> for HashSet<N, B> where
    N: Copy + Eq + Hash,
    B: BuildHasher
[src]

Loading content...

Implementors

Loading content...