pub enum IndexVec {
// some variants omitted
}
Expand description
A vector of indices.
Multiple internal representations are possible.
Implementations
sourceimpl IndexVec
impl IndexVec
sourcepub fn index(&self, index: usize) -> usize
pub fn index(&self, index: usize) -> usize
Return the value at the given index
.
(Note: we cannot implement std::ops::Index
because of lifetime
restrictions.)
sourcepub fn into_vec(self) -> Vec<usize, Global>
pub fn into_vec(self) -> Vec<usize, Global>
Return result as a Vec<usize>
. Conversion may or may not be trivial.
sourcepub fn iter(&self) -> IndexVecIter<'_>ⓘNotable traits for IndexVecIter<'a>impl<'a> Iterator for IndexVecIter<'a> type Item = usize;
pub fn iter(&self) -> IndexVecIter<'_>ⓘNotable traits for IndexVecIter<'a>impl<'a> Iterator for IndexVecIter<'a> type Item = usize;
Iterate over the indices as a sequence of usize
values
Trait Implementations
sourceimpl IntoIterator for IndexVec
impl IntoIterator for IndexVec
sourcefn into_iter(self) -> IndexVecIntoIterⓘNotable traits for IndexVecIntoIterimpl Iterator for IndexVecIntoIter type Item = usize;
fn into_iter(self) -> IndexVecIntoIterⓘNotable traits for IndexVecIntoIterimpl Iterator for IndexVecIntoIter type Item = usize;
Convert into an iterator over the indices as a sequence of usize
values
type IntoIter = IndexVecIntoIter
type IntoIter = IndexVecIntoIter
Which kind of iterator are we turning this into?
Auto Trait Implementations
impl RefUnwindSafe for IndexVec
impl Send for IndexVec
impl Sync for IndexVec
impl Unpin for IndexVec
impl UnwindSafe for IndexVec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more