enum-map 0.2.5

A library providing enum map providing type safe enum array
Documentation
1
2
3
4
5
6
7
8
9
#[macro_use]
extern crate enum_map;

#[test]
fn test_u8() {
    let map = enum_map! { b'a' => b'e', _ => 0 };
    assert_eq!(map[b'a'], b'e');
    assert_eq!(map[b'b'], 0);
}