Type Definition eytzinger_map::EytzingerRefMap[][src]

type EytzingerRefMap<'a, K, V> = EytzingerMap<&'a [(K, V)]>;
Expand description

A map based on a slice ref with Eytzinger binary search. See EytzingerMap for details.

This is useful when the base data is owned by other data.

use eytzinger_map::EytzingerRefMap;

let mut vec = vec![(1, "a"), (2, "b"), (3, "c")];
let map = EytzingerRefMap::from_ref(vec.as_mut_slice());
assert_eq!(map[&1], "a");

Implementations