Trait Enumable

Source
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§

Source

const VARIANTS: &'static [Self]

Provided Associated Constants§

Source

const COUNT: usize = _

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.

Implementors§