pub trait VariantCount {
const VARIANT_COUNT: u32;
}
Expand description
Trait to get the number of variants in any enum.
Required Associated Constants§
Sourceconst VARIANT_COUNT: u32
const VARIANT_COUNT: u32
Get the number of variants.
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.