pub trait EnumIter: Sized + 'static {
    fn unit_variant_iter() -> Box<dyn Iterator<Item = Self>> { ... }
fn all_variant_iter() -> Box<dyn Iterator<Item = Self>> { ... } }
Expand description

An enum that can iterate its variants. Ones without parameters are unit variants. Ones with exactly one parameter that is also IterEnum are nested variants. Can be auto derived with below_derive::EnumIter. Use this trait to programmatically list available variants in a FieldId.

Provided methods

Return iterator for unit variants only.

Return iterator for unit variants as well as nested variants.

Implementors