Struct enumoid::EnumMap [−][src]
A total map from enumoid T
to values V
.
Implementations
impl<T: EnumArrayHelper<V>, V: Default> EnumMap<T, V>
[src]
impl<T: EnumArrayHelper<V>, V> EnumMap<T, V>
[src]
pub fn new_with<F>(f: F) -> Self where
F: FnMut(T) -> V,
[src]
F: FnMut(T) -> V,
pub fn as_slice(&self) -> &[V]
[src]
pub fn as_slice_mut(&mut self) -> &mut [V]
[src]
pub fn get(&self, key: T) -> &V
[src]
pub fn swap(&mut self, a: T, b: T)
[src]
pub fn iter(&self) -> EnumSliceIter<'_, T, V>
[src]
pub fn iter_mut(&mut self) -> EnumSliceIterMut<'_, T, V>
[src]
Trait Implementations
impl<T: EnumArrayHelper<V>, V: Clone> Clone for EnumMap<T, V>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: EnumArrayHelper<V>, V: Copy> Copy for EnumMap<T, V> where
T::TotalArray: Copy,
[src]
T::TotalArray: Copy,
impl<T: EnumArrayHelper<V> + Debug, V: Debug> Debug for EnumMap<T, V>
[src]
impl<T: EnumArrayHelper<V>, V: Default> Default for EnumMap<T, V>
[src]
impl<'de, T: EnumFlagsHelper + EnumArrayHelper<V> + Deserialize<'de>, V: Deserialize<'de>> Deserialize<'de> for EnumMap<T, V>
[src]
fn deserialize<D>(de: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<T: EnumArrayHelper<V>, V> Index<T> for EnumMap<T, V>
[src]
impl<T: EnumArrayHelper<V>, V> IndexMut<T> for EnumMap<T, V>
[src]
impl<'a, T: EnumArrayHelper<V>, V> IntoIterator for &'a EnumMap<T, V>
[src]
type Item = (T, &'a V)
The type of the elements being iterated over.
type IntoIter = EnumSliceIter<'a, T, V>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T: EnumArrayHelper<V>, V> IntoIterator for &'a mut EnumMap<T, V>
[src]
type Item = (T, &'a mut V)
The type of the elements being iterated over.
type IntoIter = EnumSliceIterMut<'a, T, V>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T: EnumArrayHelper<V> + Serialize, V: Serialize> Serialize for EnumMap<T, V>
[src]
impl<'a, T: EnumFlagsHelper + EnumArrayHelper<V>, V> TryFrom<EnumOptionMap<T, V>> for EnumMap<T, V>
[src]
Auto Trait Implementations
impl<T, V> RefUnwindSafe for EnumMap<T, V> where
<T as EnumArrayHelper<V>>::TotalArray: RefUnwindSafe,
<T as EnumArrayHelper<V>>::TotalArray: RefUnwindSafe,
impl<T, V> Send for EnumMap<T, V> where
<T as EnumArrayHelper<V>>::TotalArray: Send,
<T as EnumArrayHelper<V>>::TotalArray: Send,
impl<T, V> Sync for EnumMap<T, V> where
<T as EnumArrayHelper<V>>::TotalArray: Sync,
<T as EnumArrayHelper<V>>::TotalArray: Sync,
impl<T, V> Unpin for EnumMap<T, V> where
<T as EnumArrayHelper<V>>::TotalArray: Unpin,
<T as EnumArrayHelper<V>>::TotalArray: Unpin,
impl<T, V> UnwindSafe for EnumMap<T, V> where
<T as EnumArrayHelper<V>>::TotalArray: UnwindSafe,
<T as EnumArrayHelper<V>>::TotalArray: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,