fixed-map 0.9.5

A fixed map where storage layout is calculated by a procedural macro.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use fixed_map::{Key, Map};

#[derive(Debug, Clone, Copy, Key)]
enum MyKey {
    First,
    Second,
}

fn main() {
    let mut map = Map::new();
    map.insert(MyKey::First, 42);
    assert_eq!(map.get(MyKey::First), Some(&42));
    assert_eq!(map.get(MyKey::Second), None);
}