Struct indexed_vec::IndexVec [−][src]
pub struct IndexVec<I, T> where
I: Idx, { /* fields omitted */ }
Methods
impl<I, T> IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> IndexVec<I, T> where
I: Idx,
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
[src]
pub fn with_capacity(cap: usize) -> Self
pub fn from_elem<S>(elem: T, universe: &IndexVec<I, S>) -> Self where
T: Clone,
[src]
pub fn from_elem<S>(elem: T, universe: &IndexVec<I, S>) -> Self where
T: Clone,
pub fn from_elem_n(elem: T, n: usize) -> Self where
T: Clone,
[src]
pub fn from_elem_n(elem: T, n: usize) -> Self where
T: Clone,
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
pub fn into_iter(self) -> IntoIter<T>
[src]
pub fn into_iter(self) -> IntoIter<T>
pub fn into_iter_enumerated(self) -> Enumerated<I, IntoIter<T>>
[src]
pub fn into_iter_enumerated(self) -> Enumerated<I, IntoIter<T>>
pub fn iter(&self) -> Iter<T>
[src]
pub fn iter(&self) -> Iter<T>
pub fn iter_mut(&mut self) -> IterMut<T>
[src]
pub fn iter_mut(&mut self) -> IterMut<T>
pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>
[src]
pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>
pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, IterMut<T>>
[src]
pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, IterMut<T>>
pub fn indices(&self) -> Map<Range<usize>, IntoIdx<I>>
[src]
pub fn indices(&self) -> Map<Range<usize>, IntoIdx<I>>
pub fn last_idx(&self) -> Option<I>
[src]
pub fn last_idx(&self) -> Option<I>
pub fn next_idx(&self) -> I
[src]
pub fn next_idx(&self) -> I
pub fn shrink_to_fit(&mut self)
[src]
pub fn shrink_to_fit(&mut self)
pub fn swap(&mut self, l: I, r: I)
[src]
pub fn swap(&mut self, l: I, r: I)
pub fn truncate(&mut self, s: usize)
[src]
pub fn truncate(&mut self, s: usize)
pub fn get(&self, i: I) -> Option<&T>
[src]
pub fn get(&self, i: I) -> Option<&T>
pub fn get_mut(&mut self, i: I) -> Option<&mut T>
[src]
pub fn get_mut(&mut self, i: I) -> Option<&mut T>
pub fn last(&self) -> Option<&T>
[src]
pub fn last(&self) -> Option<&T>
pub fn last_mut(&mut self) -> Option<&mut T>
[src]
pub fn last_mut(&mut self) -> Option<&mut T>
pub fn reserve(&mut self, s: usize)
[src]
pub fn reserve(&mut self, s: usize)
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
pub fn resize(&mut self, s: usize, v: T) where
T: Clone,
[src]
pub fn resize(&mut self, s: usize, v: T) where
T: Clone,
pub fn binary_search(&self, v: &T) -> Result<I, I> where
T: Ord,
[src]
pub fn binary_search(&self, v: &T) -> Result<I, I> where
T: Ord,
pub fn push(&mut self, d: T) -> I
[src]
pub fn push(&mut self, d: T) -> I
pub fn push_with_idx<F>(&mut self, f: F) -> I where
F: FnOnce(I) -> T,
[src]
pub fn push_with_idx<F>(&mut self, f: F) -> I where
F: FnOnce(I) -> T,
Trait Implementations
impl<I: Clone, T: Clone> Clone for IndexVec<I, T> where
I: Idx,
[src]
impl<I: Clone, T: Clone> Clone for IndexVec<I, T> where
I: Idx,
fn clone(&self) -> IndexVec<I, T>
[src]
fn clone(&self) -> IndexVec<I, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<I: Eq, T: Eq> Eq for IndexVec<I, T> where
I: Idx,
[src]
impl<I: Eq, T: Eq> Eq for IndexVec<I, T> where
I: Idx,
impl<I: PartialEq, T: PartialEq> PartialEq for IndexVec<I, T> where
I: Idx,
[src]
impl<I: PartialEq, T: PartialEq> PartialEq for IndexVec<I, T> where
I: Idx,
fn eq(&self, other: &IndexVec<I, T>) -> bool
[src]
fn eq(&self, other: &IndexVec<I, T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IndexVec<I, T>) -> bool
[src]
fn ne(&self, other: &IndexVec<I, T>) -> bool
This method tests for !=
.
impl<I: Hash, T: Hash> Hash for IndexVec<I, T> where
I: Idx,
[src]
impl<I: Hash, T: Hash> Hash for IndexVec<I, T> where
I: Idx,
fn hash<__HIT: Hasher>(&self, state: &mut __HIT)
[src]
fn hash<__HIT: Hasher>(&self, state: &mut __HIT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<I: Idx, T> Send for IndexVec<I, T> where
T: Send,
[src]
impl<I: Idx, T> Send for IndexVec<I, T> where
T: Send,
impl<I, T> Default for IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> Default for IndexVec<I, T> where
I: Idx,
impl<I, T> Index<I> for IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> Index<I> for IndexVec<I, T> where
I: Idx,
type Output = T
The returned type after indexing.
fn index(&self, i: I) -> &T
[src]
fn index(&self, i: I) -> &T
Performs the indexing (container[index]
) operation.
impl<I, T> IndexMut<I> for IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> IndexMut<I> for IndexVec<I, T> where
I: Idx,
fn index_mut(&mut self, i: I) -> &mut T
[src]
fn index_mut(&mut self, i: I) -> &mut T
Performs the mutable indexing (container[index]
) operation.
impl<I, T> Extend<T> for IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> Extend<T> for IndexVec<I, T> where
I: Idx,
fn extend<IT>(&mut self, iter: IT) where
IT: IntoIterator<Item = T>,
[src]
fn extend<IT>(&mut self, iter: IT) where
IT: IntoIterator<Item = T>,
Extends a collection with the contents of an iterator. Read more
impl<I, T> FromIterator<T> for IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> FromIterator<T> for IndexVec<I, T> where
I: Idx,
fn from_iter<IT>(iter: IT) -> Self where
IT: IntoIterator<Item = T>,
[src]
fn from_iter<IT>(iter: IT) -> Self where
IT: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
impl<I, T> IntoIterator for IndexVec<I, T> where
I: Idx,
[src]
impl<I, T> IntoIterator for IndexVec<I, T> where
I: Idx,
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> IntoIter<T>
[src]
fn into_iter(self) -> IntoIter<T>
Creates an iterator from a value. Read more
impl<'a, I, T> IntoIterator for &'a IndexVec<I, T> where
I: Idx,
[src]
impl<'a, I, T> IntoIterator for &'a IndexVec<I, T> where
I: Idx,
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<'a, I, T> IntoIterator for &'a mut IndexVec<I, T> where
I: Idx,
[src]
impl<'a, I, T> IntoIterator for &'a mut IndexVec<I, T> where
I: Idx,
type Item = &'a mut T
The type of the elements being iterated over.
type IntoIter = IterMut<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<I, T> Debug for IndexVec<I, T> where
I: Idx,
T: Debug,
[src]
impl<I, T> Debug for IndexVec<I, T> where
I: Idx,
T: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I, T> Serialize for IndexVec<I, T> where
I: Idx,
T: Serialize,
[src]
impl<I, T> Serialize for IndexVec<I, T> where
I: Idx,
T: Serialize,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de, I, T> Deserialize<'de> for IndexVec<I, T> where
I: Idx,
T: Deserialize<'de>,
[src]
impl<'de, I, T> Deserialize<'de> for IndexVec<I, T> where
I: Idx,
T: Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self
) -> Result<(), D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self
) -> Result<(), D::Error> where
D: Deserializer<'de>,