Struct enumoid::EnumVec [−][src]
A vector of values V
indexed by enumoid T
.
Implementations
impl<T: EnumArrayHelper<V>, V> EnumVec<T, V>
[src]
pub fn new() -> Self
[src]
pub fn new_with<F>(last_key: Option<T>, 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) -> Option<&V>
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn last_key(&self) -> Option<T>
[src]
pub fn swap(&mut self, a: T, b: T)
[src]
pub fn clear(&mut self)
[src]
pub fn push(&mut self, value: V)
[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 EnumVec<T, V>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: EnumArrayHelper<V> + Debug, V: Debug> Debug for EnumVec<T, V>
[src]
impl<T: EnumArrayHelper<V>, V> Default for EnumVec<T, V>
[src]
impl<'de, T: EnumFlagsHelper + EnumArrayHelper<V> + Deserialize<'de>, V: Deserialize<'de>> Deserialize<'de> for EnumVec<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> Drop for EnumVec<T, V>
[src]
impl<T: EnumArrayHelper<V>, V> FromIterator<V> for EnumVec<T, V>
[src]
fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
[src]
impl<T: EnumArrayHelper<V>, V> Index<T> for EnumVec<T, V>
[src]
impl<T: EnumArrayHelper<V>, V> IndexMut<T> for EnumVec<T, V>
[src]
impl<'a, T: EnumArrayHelper<V>, V> IntoIterator for &'a EnumVec<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<T: EnumArrayHelper<V> + Serialize, V: Serialize> Serialize for EnumVec<T, V>
[src]
impl<'a, T: EnumFlagsHelper + EnumArrayHelper<V>, V> TryFrom<EnumOptionMap<T, V>> for EnumVec<T, V>
[src]
Auto Trait Implementations
impl<T, V> RefUnwindSafe for EnumVec<T, V> where
<T as Enumoid>::CompactSize: RefUnwindSafe,
<T as EnumArrayHelper<V>>::PartialArray: RefUnwindSafe,
<T as Enumoid>::CompactSize: RefUnwindSafe,
<T as EnumArrayHelper<V>>::PartialArray: RefUnwindSafe,
impl<T, V> Send for EnumVec<T, V> where
<T as Enumoid>::CompactSize: Send,
<T as EnumArrayHelper<V>>::PartialArray: Send,
<T as Enumoid>::CompactSize: Send,
<T as EnumArrayHelper<V>>::PartialArray: Send,
impl<T, V> Sync for EnumVec<T, V> where
<T as Enumoid>::CompactSize: Sync,
<T as EnumArrayHelper<V>>::PartialArray: Sync,
<T as Enumoid>::CompactSize: Sync,
<T as EnumArrayHelper<V>>::PartialArray: Sync,
impl<T, V> Unpin for EnumVec<T, V> where
<T as Enumoid>::CompactSize: Unpin,
<T as EnumArrayHelper<V>>::PartialArray: Unpin,
<T as Enumoid>::CompactSize: Unpin,
<T as EnumArrayHelper<V>>::PartialArray: Unpin,
impl<T, V> UnwindSafe for EnumVec<T, V> where
<T as Enumoid>::CompactSize: UnwindSafe,
<T as EnumArrayHelper<V>>::PartialArray: UnwindSafe,
<T as Enumoid>::CompactSize: UnwindSafe,
<T as EnumArrayHelper<V>>::PartialArray: 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>,