[−][src]Struct rustc_data_structures::indexed_vec::IndexVec
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
raw: Vec<T>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
_marker: PhantomData<fn(_: &I)>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn from_raw(raw: Vec<T>) -> Self[src]
pub fn from_raw(raw: Vec<T>) -> Self🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn with_capacity(capacity: usize) -> Self[src]
pub fn with_capacity(capacity: usize) -> Self🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn push(&mut self, d: T) -> I[src]
pub fn push(&mut self, d: T) -> I🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn pop(&mut self) -> Option<T>[src]
pub fn pop(&mut self) -> Option<T>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usize🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
ⓘImportant traits for IntoIter<T>pub fn into_iter(self) -> IntoIter<T>[src]
pub fn into_iter(self) -> IntoIter<T>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn into_iter_enumerated(self) -> Enumerated<I, IntoIter<T>>[src]
pub fn into_iter_enumerated(self) -> Enumerated<I, IntoIter<T>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
ⓘImportant traits for Iter<'a, T>pub fn iter(&self) -> Iter<T>[src]
pub fn iter(&self) -> Iter<T>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>[src]
pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
ⓘ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>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
ⓘImportant traits for IterMut<'a, T>pub fn iter_mut(&mut self) -> IterMut<T>[src]
pub fn iter_mut(&mut self) -> IterMut<T>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, IterMut<T>>[src]
pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, IterMut<T>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn last(&self) -> Option<I>[src]
pub fn last(&self) -> Option<I>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn shrink_to_fit(&mut self)[src]
pub fn shrink_to_fit(&mut self)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn swap(&mut self, a: I, b: I)[src]
pub fn swap(&mut self, a: I, b: I)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn truncate(&mut self, a: usize)[src]
pub fn truncate(&mut self, a: usize)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn get(&self, index: I) -> Option<&T>[src]
pub fn get(&self, index: I) -> Option<&T>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn get_mut(&mut self, index: I) -> Option<&mut T>[src]
pub fn get_mut(&mut self, index: I) -> Option<&mut T>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<I: Idx, T: Clone> IndexVec<I, T>[src]
impl<I: Idx, T: Clone> IndexVec<I, T>pub fn ensure_contains_elem(
&mut self,
elem: I,
fill_value: impl FnMut() -> T
)[src]
pub fn ensure_contains_elem(
&mut self,
elem: I,
fill_value: impl FnMut() -> T
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Grows the index vector so that it contains an entry for
elem; if that is already true, then has no
effect. Otherwise, inserts new values as needed by invoking
fill_value.
pub fn resize(&mut self, new_len: usize, value: T)[src]
pub fn resize(&mut self, new_len: usize, value: T)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn resize_to_elem(
&mut self,
elem: I,
fill_value: impl FnMut() -> T
)[src]
pub fn resize_to_elem(
&mut self,
elem: I,
fill_value: impl FnMut() -> T
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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>) -> boolThis 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>) -> boolThis 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>fn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)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>fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>[src]
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<I: Idx, T: Decodable> Decodable for IndexVec<I, T>[src]
impl<I: Idx, T: Decodable> Decodable for IndexVec<I, T>fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>[src]
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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) -> ResultFormats 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) -> &TPerforms 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 TPerforms 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>
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<L, E> Links for IndexVec<L, E> where
E: LinkElem<LinkIndex = L>,
L: Idx, [src]
impl<L, E> Links for IndexVec<L, E> where
E: LinkElem<LinkIndex = L>,
L: Idx, type LinkIndex = L
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn next(links: &Self, index: L) -> Option<L>[src]
fn next(links: &Self, index: L) -> Option<L>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Auto Trait Implementations
Blanket Implementations
impl<T> Erased for T[src]
impl<T> Erased for Timpl<T> Send for T where
T: ?Sized, [src]
impl<T> Send for T where
T: ?Sized, impl<T> Sync for T where
T: ?Sized, [src]
impl<T> Sync for T where
T: ?Sized, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T[src]
impl<T> From for Timpl<I> IntoIterator for I where
I: Iterator, [src]
impl<I> IntoIterator for I where
I: Iterator, type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I[src]
fn into_iter(self) -> ICreates an iterator from a value. Read more
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T[src]
fn borrow(&self) -> &TImmutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized, [src]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized, fn encode<E>(&self, e: &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder, [src]
fn encode<E>(&self, e: &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<T> Decodable for T where
T: UseSpecializedDecodable, [src]
impl<T> Decodable for T where
T: UseSpecializedDecodable, fn decode<D>(d: &mut D) -> Result<T, <D as Decoder>::Error> where
D: Decoder, [src]
fn decode<D>(d: &mut D) -> Result<T, <D as Decoder>::Error> where
D: Decoder, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<E> SpecializationError for E[src]
impl<E> SpecializationError for Efn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized, [src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
impl<T> Erased for T