pub trait Enumable: Sized + 'static {
const VARIANTS: &'static [Self];
const COUNT: usize = _;
}
Expand description
A trait for enumerations that can be used with EnumTable
.
This trait requires that the enumeration provides a static array of its variants and a constant representing the count of these variants.
Required Associated Constants§
Provided Associated Constants§
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.