macro_rules! impl_enum { ( #[repr($repr:ident)] #[derive($($derive:meta),*)] pub enum $name:ident { $key:ident = $val:expr, $($keys:ident = $vals:expr,)* } ) => { ... }; }