[src]

Struct collections::trie::TrieSet

pub struct TrieSet {
    // some fields omitted
}

Methods

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_reverse(&self, f: |&uint| -> bool) -> bool

Visit all values in reverse order

fn iter<'a>(&'a self) -> SetItems<'a>

Get an iterator over the values in the set

fn lower_bound<'a>(&'a self, val: uint) -> SetItems<'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<'a>(&'a self, val: uint) -> SetItems<'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.

Trait Implementations

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_iter<Iter: Iterator<uint>>(iter: Iter) -> TrieSet

impl Extendable<uint> for TrieSet

fn extend<Iter: Iterator<uint>>(&mut self, iter: Iter)