Type Definition eytzinger_map::EytzingerRefMap[][src]

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

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");


impl<'a, K, V> EytzingerRefMap<'a, K, V>[src]

pub fn from_sorted_ref(s: &'a [(K, V)]) -> Self[src]

pub fn from_ref(s: &'a mut [(K, V)]) -> Self[src]