[][src]Struct plain_enum::EnumMap

pub struct EnumMap<E: TPlainEnum, V> where
    E: TPlainEnum + TInternalEnumMapType<V>, 
{ /* fields omitted */ }

Methods

impl<E, V> EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>, 
[src]

pub fn from_raw(a: E::InternalEnumMapType) -> Self[src]

Constructs an EnumMap from the underlying array type.

pub fn iter(&self) -> Iter<V>[src]

Returns an iterator over the values of the EnumMap. (Similar to an iterator over a slice.)

pub fn map<FnMap, W>(&self, fn_map: FnMap) -> EnumMap<E, W> where
    FnMap: Fn(&V) -> W,
    E: TInternalEnumMapType<W>,
    E: TPlainEnum
[src]

Maps the values in a map. (Similar to Iterator::map.)

pub fn into_raw(self) -> E::InternalEnumMapType[src]

Consumes an EnumMap and returns the underlying array.

Trait Implementations

impl<E: Clone + TPlainEnum, V: Clone> Clone for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>,
    E::InternalEnumMapType: Clone
[src]

impl<E: Copy + TPlainEnum, V: Copy> Copy for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>,
    E::InternalEnumMapType: Copy
[src]

impl<E: Debug + TPlainEnum, V: Debug> Debug for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>,
    E::InternalEnumMapType: Debug
[src]

impl<E: Eq + TPlainEnum, V: Eq> Eq for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>,
    E::InternalEnumMapType: Eq
[src]

impl<E: Hash + TPlainEnum, V: Hash> Hash for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>,
    E::InternalEnumMapType: Hash
[src]

impl<E, V> Index<E> for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>, 
[src]

type Output = V

The returned type after indexing.

impl<E, V> IndexMut<E> for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>, 
[src]

impl<E: PartialEq + TPlainEnum, V: PartialEq> PartialEq<EnumMap<E, V>> for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>,
    E::InternalEnumMapType: PartialEq
[src]

impl<E: TPlainEnum, V> StructuralEq for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>, 
[src]

impl<E: TPlainEnum, V> StructuralPartialEq for EnumMap<E, V> where
    E: TPlainEnum + TInternalEnumMapType<V>, 
[src]

Auto Trait Implementations

impl<E, V> RefUnwindSafe for EnumMap<E, V> where
    E: RefUnwindSafe,
    <E as TInternalEnumMapType<V>>::InternalEnumMapType: RefUnwindSafe

impl<E, V> Send for EnumMap<E, V> where
    E: Send,
    <E as TInternalEnumMapType<V>>::InternalEnumMapType: Send

impl<E, V> Sync for EnumMap<E, V> where
    E: Sync,
    <E as TInternalEnumMapType<V>>::InternalEnumMapType: Sync

impl<E, V> Unpin for EnumMap<E, V> where
    E: Unpin,
    <E as TInternalEnumMapType<V>>::InternalEnumMapType: Unpin

impl<E, V> UnwindSafe for EnumMap<E, V> where
    E: UnwindSafe,
    <E as TInternalEnumMapType<V>>::InternalEnumMapType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.