Struct phf_mut::Set
[−]
[src]
pub struct Set<H> { /* fields omitted */ }
A mutable, perfectly-hashed set. Note that a small domain is recommended.
For sparse sets, you might prefer std::collections::HashSet
.
Methods
impl<H: PerfectHash> Set<H>
[src]
fn new(hash: H) -> Self
Create a new, empty set.
fn insert(&mut self, k: H::K) -> bool
Insert a key into the set, so that contains
for an equal key returns true
in the future.
Returns whether this key already was in the set.
fn erase(&mut self, k: H::K) -> bool
Erases a key from the set, so that contains
for an equal key returns false
in the future.
Returns whether this key already was in the set.
fn contains(&self, k: H::K) -> bool
Returns whether the key is in the set.
fn is_empty(&self) -> bool
fn is_full(&self) -> bool
impl<H: HashInverse> Set<H>
[src]
Trait Implementations
impl<'a, H: HashInverse> IntoIterator for &'a Set<H>
[src]
type Item = H::K
The type of the elements being iterated over.
type IntoIter = SetIter<'a, H>
Which kind of iterator are we turning this into?
fn into_iter(self) -> SetIter<'a, H>
Creates an iterator from a value. Read more
impl<H: PerfectHash + Default> Default for Set<H>
[src]
impl<H: Clone> Clone for Set<H>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more