Trait enum_map::Internal [−][src]
Internal enum mapping type
This trait is internally used by #[derive(EnumMap)]
. Despite it being
a public trait, it's not intended to be public. Internal<T>
is
implemented by any enum type where V is a generic type representing a
value. The purpose of this generic type is to allow providing a value
type for arrays, as Rust currently does not support higher kinded types.
Users aren't expected to use this trait directly, but rather to use
EnumMap<K, V>
which uses this internally.
This trait is also implemented by bool
, u8
and Option
type. While u8
is
strictly speaking not an actual enum, there are good reasons to consider
it like one, as array of u8
keys is a relatively common pattern.
Associated Types
type Array
Representation of an enum map for type V
, usually an array.
Implementations on Foreign Types
impl<T> Internal<T> for bool
[src]
impl<T> Internal<T> for bool
impl<T> Internal<T> for u8
[src]
impl<T> Internal<T> for u8
impl<T, U: Internal<T>> Internal<T> for Option<U>
[src]
impl<T, U: Internal<T>> Internal<T> for Option<U>