num_enum 0.7.6

Procedural macros to make inter-operation between primitives and enums easier.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[derive(num_enum::TryFromPrimitive)]
#[repr(u8)]
enum Numbers {
    Zero = 0,
    #[num_enum(garbage)]
    One = 1,
    Two = 2,
}

fn main() {

}