pub struct TrieSet { priv map: TrieMap<()>, }
impl TrieSet
fn new() -> TrieSet
Create an empty TrieSet
fn contains(&self, value: &uint) -> bool
Return true if the set contains a value
fn insert(&mut self, value: uint) -> bool
Add a value to the set. Return true if the value was not already present in the set.
fn remove(&mut self, value: &uint) -> bool
Remove a value from the set. Return true if the value was present in the set.
fn each(&self, f: &fn(&uint) -> bool) -> bool
Visit all values in order
fn each_reverse(&self, f: &fn(&uint) -> bool) -> bool
Visit all values in reverse order
fn iter<'a>(&'a self) -> TrieSetIterator<'a>
Get an iterator over the values in the set
fn lower_bound_iter<'a>(&'a self, val: uint) -> TrieSetIterator<'a>
Get an iterator pointing to the first value that is not less than val
.
If all values in the set are less than val
an empty iterator is returned.
fn upper_bound_iter<'a>(&'a self, val: uint) -> TrieSetIterator<'a>
Get an iterator pointing to the first value that key is greater than val
.
If all values in the set are not greater than val
an empty iterator is returned.
impl Container for TrieSet
fn len(&self) -> uint
Return the number of elements in the set
impl Mutable for TrieSet
fn clear(&mut self)
Clear the set, removing all values.
impl FromIterator<uint> for TrieSet
fn from_iterator<Iter: Iterator<uint>>(iter: &mut Iter) -> TrieSet
Build a container with elements from an external iterator.
impl Extendable<uint> for TrieSet
fn extend<Iter: Iterator<uint>>(&mut self, iter: &mut Iter)
Extend a container with the elements yielded by an iterator
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).