Struct compactmap::CompactMap
[−]
[src]
pub struct CompactMap<V> { /* fields omitted */ }
Methods
impl<V> CompactMap<V>
[src]
fn new() -> CompactMap<V>
fn insert(&mut self, v: V) -> usize
fn take(&mut self, i: usize) -> Option<V>
fn remove(&mut self, i: usize)
fn get(&self, i: usize) -> Option<&V>
fn get_mut(&mut self, i: usize) -> Option<&mut V>
Trait Implementations
impl<V: Clone> Clone for CompactMap<V>
[src]
fn clone(&self) -> CompactMap<V>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<V: Debug> Debug for CompactMap<V>
[src]
impl<V> Default for CompactMap<V>
[src]
fn default() -> CompactMap<V>
Returns the "default value" for a type. Read more
impl<V> Hash for CompactMap<V> where
V: Hash,
[src]
V: Hash,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<V> PartialEq<CompactMap<V>> for CompactMap<V> where
V: PartialEq<V>,
[src]
V: PartialEq<V>,
fn eq(&self, other: &CompactMap<V>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<V> Eq for CompactMap<V> where
V: Eq,
[src]
V: Eq,
impl<V> PartialOrd<CompactMap<V>> for CompactMap<V> where
V: PartialOrd<V>,
[src]
V: PartialOrd<V>,
fn partial_cmp(&self, other: &CompactMap<V>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<V> Ord for CompactMap<V> where
V: Ord,
[src]
V: Ord,
fn cmp(&self, other: &CompactMap<V>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<V> FromIterator<V> for CompactMap<V>
[src]
fn from_iter<I>(iter: I) -> CompactMap<V> where
I: IntoIterator<Item = V>,
I: IntoIterator<Item = V>,
Creates a value from an iterator. Read more
impl<'a, V> FromIterator<&'a V> for CompactMap<V> where
V: Copy,
[src]
V: Copy,
fn from_iter<I>(iter: I) -> CompactMap<V> where
I: IntoIterator<Item = &'a V>,
I: IntoIterator<Item = &'a V>,
Creates a value from an iterator. Read more
impl<V> Extend<V> for CompactMap<V>
[src]
fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = V>,
I: IntoIterator<Item = V>,
Extends a collection with the contents of an iterator. Read more
impl<'a, V> Extend<&'a V> for CompactMap<V> where
V: Copy,
[src]
V: Copy,
fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = &'a V>,
I: IntoIterator<Item = &'a V>,
Extends a collection with the contents of an iterator. Read more
impl<V> Index<usize> for CompactMap<V>
[src]
type Output = V
The returned type after indexing
fn index<'a>(&'a self, i: usize) -> &'a V
The method for the indexing (container[index]
) operation
impl<'a, V> Index<&'a usize> for CompactMap<V>
[src]
type Output = V
The returned type after indexing
fn index(&self, i: &usize) -> &V
The method for the indexing (container[index]
) operation
impl<V> IndexMut<usize> for CompactMap<V>
[src]
fn index_mut(&mut self, i: usize) -> &mut V
The method for the mutable indexing (container[index]
) operation
impl<'a, V> IndexMut<&'a usize> for CompactMap<V>
[src]
fn index_mut(&mut self, i: &usize) -> &mut V
The method for the mutable indexing (container[index]
) operation
impl<'a, V> IntoIterator for &'a CompactMap<V>
[src]
type Item = (usize, &'a V)
The type of the elements being iterated over.
type IntoIter = ReadOnlyIter<'a, V>
Which kind of iterator are we turning this into?
fn into_iter(self) -> ReadOnlyIter<'a, V>
Creates an iterator from a value. Read more
impl<'a, V: 'a> IntoIterator for &'a mut CompactMap<V>
[src]
type Item = (usize, &'a mut V)
The type of the elements being iterated over.
type IntoIter = MutableIter<'a, V>
Which kind of iterator are we turning this into?
fn into_iter(self) -> MutableIter<'a, V>
Creates an iterator from a value. Read more