[][src]Struct treez::rb::TreeRb

pub struct TreeRb<K, V> where
    K: Ord + Default + Bounded + Clone,
    V: Default + Clone
{ /* fields omitted */ }

vector indexed red-black tree implementation

Implementations

impl<K, V> TreeRb<K, V> where
    K: Ord + Default + Bounded + Clone,
    V: Default + Clone
[src]

pub fn new() -> TreeRb<K, V>[src]

pub fn len(&self) -> usize[src]

pub fn len_freelist(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn insert(&mut self, key: K, val: V) -> Option<V>[src]

pub fn remove(&mut self, key: &K) -> Option<V>[src]

returns the value of the removed item, otherwise return None

pub fn contains_key(&self, key: K) -> bool[src]

check to see if an item with the input key exists

pub fn shrink_to_fit(&mut self)[src]

calls shrink to fit on all vectors

pub fn with_capacity(capacity: usize) -> Self[src]

creates a new rbtree with buf.capacity = capacity

pub fn predecessor(&self, key: K) -> Option<&V>[src]

returns the biggest value l<=k which is in the tree

pub fn successor(&self, key: K) -> Option<&V>[src]

returns the smallest value l>=k which is in the tree

pub fn get(&self, key: K) -> Option<V>[src]

get the value of the item with the input key, otherwise return None

pub fn clear(&mut self)[src]

pub fn compact(&mut self)[src]

compacts up unused slots in node array

pub fn print(&mut self)[src]

pub fn check_nodes(&self)[src]

Trait Implementations

impl<K: Clone, V: Clone> Clone for TreeRb<K, V> where
    K: Ord + Default + Bounded + Clone,
    V: Default + Clone
[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for TreeRb<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for TreeRb<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for TreeRb<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for TreeRb<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for TreeRb<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,