[][src]Derive Macro num_variants::NumVariants

#[derive(NumVariants)]
{
    // Attributes available to this derive:
    #[num_variants]
}

Derives an associated constant with the number of variants this enum has.

The default constant name is NUM_VARIANTS. This can be customized with #[num_variants = "FOO")].