[−][src]Struct ziptree::ZipTree
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]
K: Ord,
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]
K: Borrow<Q>,
Q: Ord,
pub fn get_mut<'a, Q: ?Sized>(&'a mut self, key: &Q) -> Option<&'a mut V> where
K: Borrow<Q>,
Q: Ord,
[src]
K: Borrow<Q>,
Q: Ord,
pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where
K: Borrow<Q>,
Q: Ord,
[src]
K: Borrow<Q>,
Q: Ord,
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]
K: Borrow<Q>,
Q: Ord,
ⓘImportant traits for Iter<'a, K, V>pub fn iter<'a>(&'a self) -> Iter<'a, K, V>
[src]
ⓘImportant traits for Iter<'a, K, V>
ⓘImportant traits for IterMut<'a, K, V>pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, K, V>
[src]
ⓘImportant traits for IterMut<'a, K, V>
ⓘImportant traits for Keys<'a, K, V>pub fn keys<'a>(&'a self) -> Keys<'a, K, V>
[src]
ⓘImportant traits for Keys<'a, K, V>
ⓘImportant traits for Values<'a, K, V>pub fn values<'a>(&'a self) -> Values<'a, K, V>
[src]
ⓘImportant traits for Values<'a, K, V>
ⓘImportant traits for ValuesMut<'a, K, V>pub fn values_mut<'a>(&'a mut self) -> ValuesMut<'a, K, V>
[src]
ⓘImportant traits for ValuesMut<'a, K, V>
Trait Implementations
impl<K, V> Drop for ZipTree<K, V>
[src]
impl<K: Clone, V: Clone> Clone for ZipTree<K, V>
[src]
fn clone(&self) -> Self
[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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<K, V, Q: ?Sized, '_> Index<&'_ Q> for ZipTree<K, V> where
K: Borrow<Q> + Ord,
Q: Ord,
[src]
K: Borrow<Q> + Ord,
Q: Ord,
impl<K, V, Q: ?Sized, '_> IndexMut<&'_ Q> for ZipTree<K, V> where
K: Borrow<Q> + Ord,
Q: Ord,
[src]
K: Borrow<Q> + Ord,
Q: Ord,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,