Trait grove::data::example_data::Keyed[][src]

pub trait Keyed<Key> where
    Key: Ord
{ fn get_key(&self) -> &Key; }
Expand description

A trait for values that are keyed by a key type Key. When using keyed values, we assume that all of the elements in the tree are in sorted order.

For example, when storing integers in sorted order, use the Ordered struct, and now you can use binary search to find specific elements / specify the edges of the segments you want to act upon.

Smaller values go on the left.

Required methods

Gets the key associated with a value

Implementors