Struct rustc_data_structures::indexed_vec::IndexVec [−][src]
Fields
raw: Vec<T>
Methods
impl<I: Idx, T> IndexVec<I, T>
[src]
impl<I: Idx, T> IndexVec<I, T>
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn from_raw(raw: Vec<T>) -> Self
[src]
pub fn from_raw(raw: Vec<T>) -> Self
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn with_capacity(capacity: 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 push(&mut self, d: T) -> I
[src]
pub fn push(&mut self, d: T) -> I
pub fn pop(&mut self) -> Option<T>
[src]
pub fn pop(&mut self) -> Option<T>
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
ⓘImportant traits for IntoIter<T>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>>
ⓘImportant traits for Iter<'a, T>pub fn iter(&self) -> Iter<T>
[src]
pub fn iter(&self) -> Iter<T>
pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>
[src]
pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>
ⓘImportant traits for Map<I, F>pub fn indices(&self) -> Map<Range<usize>, IntoIdx<I>>
[src]
pub fn indices(&self) -> Map<Range<usize>, IntoIdx<I>>
ⓘImportant traits for IterMut<'a, T>pub fn iter_mut(&mut self) -> IterMut<T>
[src]
pub fn iter_mut(&mut self) -> IterMut<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 drain<'a, R: RangeBounds<usize>>(
&'a mut self,
range: R
) -> impl Iterator<Item = T> + 'a
[src]
pub fn drain<'a, R: RangeBounds<usize>>(
&'a mut self,
range: R
) -> impl Iterator<Item = T> + 'a
pub fn drain_enumerated<'a, R: RangeBounds<usize>>(
&'a mut self,
range: R
) -> impl Iterator<Item = (I, T)> + 'a
[src]
pub fn drain_enumerated<'a, R: RangeBounds<usize>>(
&'a mut self,
range: R
) -> impl Iterator<Item = (I, T)> + 'a
pub fn last(&self) -> Option<I>
[src]
pub fn last(&self) -> Option<I>
pub fn shrink_to_fit(&mut self)
[src]
pub fn shrink_to_fit(&mut self)
pub fn swap(&mut self, a: usize, b: usize)
[src]
pub fn swap(&mut self, a: usize, b: usize)
pub fn truncate(&mut self, a: usize)
[src]
pub fn truncate(&mut self, a: usize)
pub fn get(&self, index: I) -> Option<&T>
[src]
pub fn get(&self, index: I) -> Option<&T>
pub fn get_mut(&mut self, index: I) -> Option<&mut T>
[src]
pub fn get_mut(&mut self, index: I) -> Option<&mut T>
pub fn pick2_mut(&mut self, a: I, b: I) -> (&mut T, &mut T)
[src]
pub fn pick2_mut(&mut self, a: I, b: I) -> (&mut T, &mut T)
Return mutable references to two distinct elements, a and b. Panics if a == b.
pub fn convert_index_type<Ix: Idx>(self) -> IndexVec<Ix, T>
[src]
pub fn convert_index_type<Ix: Idx>(self) -> IndexVec<Ix, T>
impl<I: Idx, T: Clone> IndexVec<I, T>
[src]
impl<I: Idx, T: Clone> IndexVec<I, T>
impl<I: Idx, T: Ord> IndexVec<I, T>
[src]
impl<I: Idx, T: Ord> IndexVec<I, T>
pub fn binary_search(&self, value: &T) -> Result<I, I>
[src]
pub fn binary_search(&self, value: &T) -> Result<I, I>
Trait Implementations
impl<I: Clone + Idx, T: Clone> Clone for IndexVec<I, T>
[src]
impl<I: Clone + Idx, T: Clone> Clone for IndexVec<I, T>
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: PartialEq + Idx, T: PartialEq> PartialEq for IndexVec<I, T>
[src]
impl<I: PartialEq + Idx, T: PartialEq> PartialEq for IndexVec<I, T>
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: Eq + Idx, T: Eq> Eq for IndexVec<I, T>
[src]
impl<I: Eq + Idx, T: Eq> Eq for IndexVec<I, T>
impl<I: Hash + Idx, T: Hash> Hash for IndexVec<I, T>
[src]
impl<I: Hash + Idx, T: Hash> Hash for IndexVec<I, T>
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: Idx, T: Encodable> Encodable for IndexVec<I, T>
[src]
impl<I: Idx, T: Encodable> Encodable for IndexVec<I, T>
impl<I: Idx, T: Decodable> Decodable for IndexVec<I, T>
[src]
impl<I: Idx, T: Decodable> Decodable for IndexVec<I, T>
impl<I: Idx, T: Debug> Debug for IndexVec<I, T>
[src]
impl<I: Idx, T: Debug> Debug for IndexVec<I, T>
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I: Idx, T> Index<I> for IndexVec<I, T>
[src]
impl<I: Idx, T> Index<I> for IndexVec<I, T>
type Output = T
The returned type after indexing.
ⓘImportant traits for &'a mut Rfn index(&self, index: I) -> &T
[src]
fn index(&self, index: I) -> &T
Performs the indexing (container[index]
) operation.
impl<I: Idx, T> IndexMut<I> for IndexVec<I, T>
[src]
impl<I: Idx, T> IndexMut<I> for IndexVec<I, T>
ⓘImportant traits for &'a mut Rfn index_mut(&mut self, index: I) -> &mut T
[src]
fn index_mut(&mut self, index: I) -> &mut T
Performs the mutable indexing (container[index]
) operation.
impl<I: Idx, T> Default for IndexVec<I, T>
[src]
impl<I: Idx, T> Default for IndexVec<I, T>
impl<I: Idx, T> Extend<T> for IndexVec<I, T>
[src]
impl<I: Idx, T> Extend<T> for IndexVec<I, T>
fn extend<J: IntoIterator<Item = T>>(&mut self, iter: J)
[src]
fn extend<J: IntoIterator<Item = T>>(&mut self, iter: J)
Extends a collection with the contents of an iterator. Read more
impl<I: Idx, T> FromIterator<T> for IndexVec<I, T>
[src]
impl<I: Idx, T> FromIterator<T> for IndexVec<I, T>
fn from_iter<J>(iter: J) -> Self where
J: IntoIterator<Item = T>,
[src]
fn from_iter<J>(iter: J) -> Self where
J: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
impl<I: Idx, T> IntoIterator for IndexVec<I, T>
[src]
impl<I: Idx, T> IntoIterator for IndexVec<I, T>
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
ⓘImportant traits for IntoIter<T>fn into_iter(self) -> IntoIter<T>
[src]
fn into_iter(self) -> IntoIter<T>
Creates an iterator from a value. Read more
impl<'a, I: Idx, T> IntoIterator for &'a IndexVec<I, T>
[src]
impl<'a, I: Idx, T> IntoIterator for &'a IndexVec<I, T>
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?
ⓘImportant traits for Iter<'a, T>fn into_iter(self) -> Iter<'a, T>
[src]
fn into_iter(self) -> Iter<'a, T>
Creates an iterator from a value. Read more
impl<'a, I: Idx, T> IntoIterator for &'a mut IndexVec<I, T>
[src]
impl<'a, I: Idx, T> IntoIterator for &'a mut IndexVec<I, T>
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?
ⓘImportant traits for IterMut<'a, T>fn into_iter(self) -> IterMut<'a, T>
[src]
fn into_iter(self) -> IterMut<'a, T>
Creates an iterator from a value. Read more
impl<I: Idx, T, CTX> HashStable<CTX> for IndexVec<I, T> where
T: HashStable<CTX>,
[src]
impl<I: Idx, T, CTX> HashStable<CTX> for IndexVec<I, T> where
T: HashStable<CTX>,
fn hash_stable<W: StableHasherResult>(
&self,
ctx: &mut CTX,
hasher: &mut StableHasher<W>
)
[src]
fn hash_stable<W: StableHasherResult>(
&self,
ctx: &mut CTX,
hasher: &mut StableHasher<W>
)