const-table 0.1.0

Associate struct-typed constants with enum variants
Documentation
1
2
3
4
5
6
7
8
9
10
use const_table::const_table;

#[const_table]
#[derive(Debug)]
enum SpeciesID {
    SpeciesInfo { pub sound: &'static str },
    Human = SpeciesInfo { sound: "Hello World" }
}

fn main() {}