[][src]Trait derive_enum::Iter

pub trait Iter {
    fn all(
    ) -> Box<dyn Iterator<Item = (&'static str, &'static dyn Fn() -> Self)>>; }

Provides an iterator on the variants of an enum.

The iterator yields a tuple containing the name of the variant and a closure to create a default instance of the enum variant. The behaviour of the closure is equivalent to calling FromStr.

Requires the iter feature.

Required methods

fn all() -> Box<dyn Iterator<Item = (&'static str, &'static dyn Fn() -> Self)>>

Loading content...

Implementors

Loading content...