1 2 3 4 5 6 7 8 9
pub use autovariants_derive::Variants; pub trait Variants<const N: usize> where Self: Sized, { const VARIANTS: [Self; N]; /// Returns a static reference to all variants of this enum fn variants() -> &'static [Self]; }