Trait enum_map::EnumArray

source ·
pub trait EnumArray<V>: Enum {
    type Array: Array<V>;
}
Expand description

Trait associating enum with an array.

This exists due to limitations of Rust compiler that prevent arrays from using associated constants in structures. The array length must match LENGTH of an Enum.

Required Associated Types§

source

type Array: Array<V>

Representation of an enum map for type V.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> EnumArray<T> for Ordering

source§

impl<T> EnumArray<T> for Infallible

source§

impl<T> EnumArray<T> for bool

source§

impl<T> EnumArray<T> for u8

source§

impl<T> EnumArray<T> for ()

Implementors§