pub trait EnumIterwhere
Self: Sized,{
// Required method
fn variants() -> Vec<Self>;
}Expand description
Allows collecting all variants of an enum.
See also the
IntoEnumIterator
trait of the strum crate for a version which can
be automatically derived.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.