[][src]Struct algorithms_edu::data_structures::balanced_tree::avl_tree::AvlTree

pub struct AvlTree<T: Ord + Debug + PartialEq + Eq + Clone> { /* fields omitted */ }

Implementations

impl<T: Ord + Debug + PartialEq + Eq + Clone> AvlTree<T>[src]

pub fn new() -> Self[src]

pub fn height(&self) -> Option<i32>[src]

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

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

pub fn contains(&self, value: &T) -> bool[src]

pub fn insert(&mut self, value: T) -> bool[src]

If the value is not found in the AVL tree, insert it and return true. Otherwise, do not insert and return false.

pub fn remove(&mut self, elem: &T) -> bool[src]

pub fn iter(&self) -> AvlIter<'_, T>

Notable traits for AvlIter<'a, T>

impl<'a, T: 'a + Ord + Debug + PartialEq + Eq + Clone> Iterator for AvlIter<'a, T> type Item = &'a T;
[src]

Trait Implementations

impl<T: Clone + Ord + Debug + PartialEq + Eq> Clone for AvlTree<T>[src]

impl<T: Debug + Ord + PartialEq + Eq + Clone> Debug for AvlTree<T>[src]

impl<T: Default + Ord + Debug + PartialEq + Eq + Clone> Default for AvlTree<T>[src]

impl<T: Eq + Ord + Debug + PartialEq + Clone> Eq for AvlTree<T>[src]

impl<T: PartialEq + Ord + Debug + Eq + Clone> PartialEq<AvlTree<T>> for AvlTree<T>[src]

impl<T: Ord + Debug + PartialEq + Eq + Clone> StructuralEq for AvlTree<T>[src]

impl<T: Ord + Debug + PartialEq + Eq + Clone> StructuralPartialEq for AvlTree<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for AvlTree<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for AvlTree<T> where
    T: Send
[src]

impl<T> Sync for AvlTree<T> where
    T: Sync
[src]

impl<T> Unpin for AvlTree<T>[src]

impl<T> UnwindSafe for AvlTree<T> where
    T: UnwindSafe
[src]

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<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized
[src]

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>,