macro_rules! def_const_type_enum {
($vis:vis $name:ident => $ty:ty {
$($variant:ident => $val:expr),+
$(,)?
}) => { ... };
}Expand description
define an “enum” (struct) of a singular type
def_const_type_enum! (pub enumName => Type {
field1 => value,
field2 => value,
});