[][src]Struct rust_black_trees::unbalancetree::BSTree

pub struct BSTree<T> { /* fields omitted */ }

Arena based memory tree structure

Trait Implementations

impl<T> BaseTree<T> for BSTree<T> where
    T: PartialOrd,
    T: PartialEq,
    T: Debug
[src]

type MNode = RegularNode<T>

fn get(&self, val: usize) -> &Self::MNode[src]

In order to return a reference to a value of a vector contained within a refcell, a raw pointer is used. The unsafe code could be avoided by replacing each call to self.get(n) with &self.data.borrow()[n] and each call to self.get_mut(n) with &mut self.data.borrow()[n]. This allows us to do the same thing with less keystrokes. It does make the program not thread-safe, but a this data structure is a pretty terrible choice for a multi-threaded data structure anyways, since re-balancing can require that most of the tree be locked to one thread during an insertion or deletion

impl<T: Debug> Debug for BSTree<T>[src]

impl<T> Tree<T> for BSTree<T> where
    T: PartialOrd,
    T: PartialEq,
    T: Debug
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for BSTree<T>

impl<T> !Send for BSTree<T>

impl<T> !Sync for BSTree<T>

impl<T> Unpin for BSTree<T>

impl<T> !UnwindSafe for BSTree<T>

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> From<T> for T[src]

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.