pub unsafe trait Enum: DeserializeOwned + FromStr + Copy + 'static {
const COUNT: usize;
const VARIANTS: &'static [Self];
const NAMES: &'static [&'static str];
// Required method
fn discriminant(&self) -> usize;
// Provided methods
fn name(&self) -> &'static str { ... }
fn from_name(s: &str) -> Option<Self> { ... }
}