Struct collections::treemap::TreeSet[src]
pub struct TreeSet<T> {
// some fields omitted
}A implementation of the Set trait on top of the TreeMap container. The
only requirement is that the type of the elements contained ascribes to the
Ord trait.
Methods
impl<T: Ord> TreeSet<T>
fn new() -> TreeSet<T>
Create an empty TreeSet
fn iter<'a>(&'a self) -> SetItems<'a, T>
Get a lazy iterator over the values in the set. Requires that it be frozen (immutable).
fn rev_iter<'a>(&'a self) -> RevSetItems<'a, T>
Get a lazy iterator over the values in the set. Requires that it be frozen (immutable).
fn move_iter(self) -> MoveSetItems<T>
Get a lazy iterator that consumes the set.
fn lower_bound<'a>(&'a self, v: &T) -> SetItems<'a, T>
Get a lazy iterator pointing to the first value not less than v (greater or equal).
If all elements in the set are less than v empty iterator is returned.
fn upper_bound<'a>(&'a self, v: &T) -> SetItems<'a, T>
Get a lazy iterator pointing to the first value greater than v.
If all elements in the set are not greater than v empty iterator is returned.
fn difference<'a>(&'a self, other: &'a TreeSet<T>) -> DifferenceItems<'a, T>
Visit the values (in-order) representing the difference
fn symmetric_difference<'a>(&'a self, other: &'a TreeSet<T>) -> SymDifferenceItems<'a, T>
Visit the values (in-order) representing the symmetric difference
fn intersection<'a>(&'a self, other: &'a TreeSet<T>) -> IntersectionItems<'a, T>
Visit the values (in-order) representing the intersection
fn union<'a>(&'a self, other: &'a TreeSet<T>) -> UnionItems<'a, T>
Visit the values (in-order) representing the union