Trait every_variant::EveryVariant[][src]

pub trait EveryVariant: Sized {
    fn every_variant() -> Vec<Self>;

    fn for_every_variant<F: Fn(&Self)>(closure: F) { ... }
}
Expand description

Trait that supplies a function to generate a vector containing all possible variants in a tree

Required methods

A vector of variants that should contain every possible variant of the struct or enum

Provided methods

Helper function, loops of each variant in an enum. Else does nothing.

Implementations on Foreign Types

Implementors