A key,value store that works on anything.

This works using a binary search tree. In the first version, it's a very naive algorithm, but it will probably be updated to be a red-black tree or something else.

Type TreeEdge

type TreeEdge<K, V> = Option<@TreeNode<K, V>>

Type TreeMap

type TreeMap<K, V> = @mut TreeEdge<K, V>

Enum TreeNode

Variants

Function TreeMap

fn TreeMap<K, V>() -> TreeMap<K, V>

Create a treemap

Function find

fn find<K: Copy Eq Ord, V: Copy>(m: & const TreeEdge<K, V>, k: K) -> Option<V>

Find a value based on the key

Function insert

fn insert<K: Copy Eq Ord, V: Copy>(m: & mut TreeEdge<K, V>, k: K, v: V)

Insert a value into the map

Function traverse

fn traverse<K, V: Copy>(m: & const TreeEdge<K, V>, f: fn&(& K, & V))

Visit all pairs in the map in order.