[][src]Struct ziptree::ZipTree

pub struct ZipTree<K, V> { /* fields omitted */ }

Tarjan's zip tree implementation.

The ZipTree API mimics the standard library's BTreeMap. It provides look-ups, insertions, deletions and iterator interface. Cloning this tree will deep copy overall tree structure, and thus takes O(n) time.

Methods

impl<K, V> ZipTree<K, V> where
    K: Ord
[src]

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

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

pub fn get<Q: ?Sized>(&self, key: &Q) -> Option<&V> where
    K: Borrow<Q>,
    Q: Ord
[src]

pub fn get_mut<'a, Q: ?Sized>(&'a mut self, key: &Q) -> Option<&'a mut V> where
    K: Borrow<Q>,
    Q: Ord
[src]

pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where
    K: Borrow<Q>,
    Q: Ord
[src]

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

pub fn clear(&mut self)[src]

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

pub fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V> where
    K: Borrow<Q>,
    Q: Ord
[src]

Important traits for Iter<'a, K, V>
pub fn iter<'a>(&'a self) -> Iter<'a, K, V>[src]

Important traits for IterMut<'a, K, V>
pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, K, V>[src]

Important traits for Keys<'a, K, V>
pub fn keys<'a>(&'a self) -> Keys<'a, K, V>[src]

Important traits for Values<'a, K, V>
pub fn values<'a>(&'a self) -> Values<'a, K, V>[src]

Important traits for ValuesMut<'a, K, V>
pub fn values_mut<'a>(&'a mut self) -> ValuesMut<'a, K, V>[src]

Trait Implementations

impl<K, V> Drop for ZipTree<K, V>[src]

impl<K: Clone, V: Clone> Clone for ZipTree<K, V>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<K, V> IntoIterator for ZipTree<K, V>[src]

type Item = (K, V)

The type of the elements being iterated over.

type IntoIter = IntoIter<K, V>

Which kind of iterator are we turning this into?

impl<K, V, Q: ?Sized, '_> Index<&'_ Q> for ZipTree<K, V> where
    K: Borrow<Q> + Ord,
    Q: Ord
[src]

type Output = V

The returned type after indexing.

impl<K, V, Q: ?Sized, '_> IndexMut<&'_ Q> for ZipTree<K, V> where
    K: Borrow<Q> + Ord,
    Q: Ord
[src]

Auto Trait Implementations

impl<K, V> !Send for ZipTree<K, V>

impl<K, V> !Sync for ZipTree<K, V>

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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