Trait enum_map::Internal [] [src]

pub trait Internal<V>: Sized {
    type Array;
}

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

Representation of an enum map for type V, usually an array.

Implementations on Foreign Types

impl<T> Internal<T> for bool
[src]

[src]

[src]

[src]

[src]

[src]

impl<T> Internal<T> for u8
[src]

[src]

[src]

[src]

[src]

[src]

impl<T, U: Internal<T>> Internal<T> for Option<U>
[src]

[src]

[src]

[src]

[src]

[src]

Implementors