Trait TreeOrd

Source
pub trait TreeOrd<'a, T: IntrusiveNode<'a>> {
    // Required method
    fn tree_cmp(&self, elem: &'a T::Elem) -> Ordering;
}
Expand description

A total ordering between the Self type and the tree’s element type T::Elem.

Different from Ord in that it allows Self and T::Elem to be distinct types, so that you can query a splay tree without fully constructing its element type.

Required Methods§

Source

fn tree_cmp(&self, elem: &'a T::Elem) -> Ordering

What is the ordering relationship between self and the given tree element?

Implementors§