Struct collections::btree::BTree[src]

pub struct BTree<K, V> {
    // some fields omitted
}

Methods

impl<K: Ord, V> BTree<K, V>

fn new(k: K, v: V, lb: uint) -> BTree<K, V>

Returns new BTree with root node (leaf) and user-supplied lower bound The lower bound applies to every node except the root node.

impl<K: Clone + Ord, V: Clone> BTree<K, V>

fn get(self, k: K) -> Option<V>

Returns the value of a given key, which may not exist in the tree. Calls the root node's get method.

fn insert(self, k: K, v: V) -> BTree<K, V>

An insert method that uses the clone() feature for support.

Trait Implementations

impl<K: Clone + Ord, V: Clone> Clone for BTree<K, V>

fn clone(&self) -> BTree<K, V>

Implements the Clone trait for the BTree. Uses a helper function/constructor to produce a new BTree.

fn clone_from(&mut self, source: &Self)

impl<K: Ord, V: Eq> PartialEq for BTree<K, V>

fn eq(&self, other: &BTree<K, V>) -> bool

fn ne(&self, other: &Self) -> bool

impl<K: Ord, V: Eq> Eq for BTree<K, V>

impl<K: Ord, V: Eq> PartialOrd for BTree<K, V>

fn lt(&self, other: &BTree<K, V>) -> bool

fn le(&self, other: &Self) -> bool

fn gt(&self, other: &Self) -> bool

fn ge(&self, other: &Self) -> bool

impl<K: Ord, V: Eq> Ord for BTree<K, V>

fn cmp(&self, other: &BTree<K, V>) -> Ordering

Returns an ordering based on the root nodes of each BTree.

impl<K: Show + Ord, V: Show> Show for BTree<K, V>

fn fmt(&self, f: &mut Formatter) -> Result

Returns a string representation of the BTree