Trait below_model::EnumIter
source · pub trait EnumIter: Sized + 'static {
// Provided methods
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§
sourcefn unit_variant_iter() -> Box<dyn Iterator<Item = Self>>
fn unit_variant_iter() -> Box<dyn Iterator<Item = Self>>
Return iterator for unit variants only.
sourcefn all_variant_iter() -> Box<dyn Iterator<Item = Self>>
fn all_variant_iter() -> Box<dyn Iterator<Item = Self>>
Return iterator for unit variants as well as nested variants.