Struct tinyset::vecset::VecSet
[−]
[src]
pub struct VecSet<T> { /* fields omitted */ }A set that is stored in a Vec
Methods
impl<T: Eq> VecSet<T>[src]
fn new() -> VecSet<T>[src]
Creates an empty set..
fn default() -> VecSet<T>[src]
Creates an empty set..
fn len(&self) -> usize[src]
Returns the number of elements in the set.
fn insert(&mut self, elem: T) -> bool[src]
Adds a value to the set.
If the set did not have this value present, true is returned.
If the set did have this value present, false is returned.
fn contains<Q: ?Sized>(&self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq, [src]
T: Borrow<Q>,
Q: Hash + Eq,
Returns true if the set contains a value.
fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq, [src]
T: Borrow<Q>,
Q: Hash + Eq,
Removes an element, and returns true if that element was present.
fn iter(&self) -> Iter<T>[src]
Returns an iterator over the set.