[][src]Trait rust_black_trees::node::Node

pub trait Node<T> {
    fn get_value(&self) -> &T;
fn get(&self, i: usize) -> &Self;
fn get_mut(&self, i: usize) -> &mut Self;
fn location(&self) -> usize;
fn get_parent(&self) -> Option<usize>;
fn set_parent(&mut self, p: Option<usize>);
fn get_child(&self, side: Side) -> Option<usize>;
fn set_child(&mut self, child: usize, side: Side);
fn set_child_opt(&mut self, child: Option<usize>, side: Side);
fn to_self_string(&self) -> String;
fn to_self_string_display(&self) -> (String, usize);
fn is(&self, val: &T) -> bool;
fn greater(&self, val: &T) -> bool;
fn lesser(&self, val: &T) -> bool; fn to_string(&self) -> String { ... }
fn to_pretty_string(&self, indent: usize) -> String { ... }
fn get_height(&self) -> usize { ... }
fn get_depth(&self) -> usize { ... }
fn get_size(&self) -> usize { ... }
fn find_min(&self) -> usize { ... }
fn side(&self) -> Side { ... }
fn get_sibling(&self) -> Option<usize> { ... }
fn get_uncle(&self) -> Option<usize> { ... }
fn is_child(&self, side: Side) -> bool { ... } }

Required methods

fn get_value(&self) -> &T

fn get(&self, i: usize) -> &Self

fn get_mut(&self, i: usize) -> &mut Self

fn location(&self) -> usize

fn get_parent(&self) -> Option<usize>

fn set_parent(&mut self, p: Option<usize>)

fn get_child(&self, side: Side) -> Option<usize>

fn set_child(&mut self, child: usize, side: Side)

fn set_child_opt(&mut self, child: Option<usize>, side: Side)

fn to_self_string(&self) -> String

fn to_self_string_display(&self) -> (String, usize)

fn is(&self, val: &T) -> bool

fn greater(&self, val: &T) -> bool

fn lesser(&self, val: &T) -> bool

Loading content...

Provided methods

fn to_string(&self) -> String

fn to_pretty_string(&self, indent: usize) -> String

fn get_height(&self) -> usize

fn get_depth(&self) -> usize

fn get_size(&self) -> usize

fn find_min(&self) -> usize

fn side(&self) -> Side

fn get_sibling(&self) -> Option<usize>

fn get_uncle(&self) -> Option<usize>

fn is_child(&self, side: Side) -> bool

Loading content...

Implementors

impl<T: Debug + PartialOrd> Node<T> for AVLNode<T>[src]

fn get(&self, ptr: usize) -> &AVLNode<T>[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]

impl<T: Debug + PartialOrd> Node<T> for ColorNode<T>[src]

fn get(&self, ptr: usize) -> &ColorNode<T>[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]

impl<T: Debug + PartialOrd> Node<T> for RegularNode<T>[src]

fn get(&self, ptr: usize) -> &RegularNode<T>[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]

Loading content...