macro_rules! IterVariantNames {
    (($itername:ident) $vis:vis enum $name:ident { $($body:tt)* }) => { ... };
    (() $vis:vis enum $name:ident { $($body:tt)* }) => { ... };
}
Expand description

Derives iter_variant_names() for an unitary enum, which returns an iterator over the string names of the variants of the enum in lexical order.

The argument is the name of the iterator type that will be generated:

macro_attr! {
    #[derive(IterVariantNames!(GetVariantNames))]
    pub enum Get { Up, Down, AllAround }
}

Neither macro imposes any naming requirements, save the obvious: the name must not conflict with any other types.