pub enum IndexVec {
// some variants omitted
}
Expand description
A vector of indices.
Multiple internal representations are possible.
Implementations§
Source§impl 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>
pub fn into_vec(self) -> Vec<usize>
Return result as a Vec<usize>
. Conversion may or may not be trivial.
Sourcepub fn iter(&self) -> IndexVecIter<'_> ⓘ
pub fn iter(&self) -> IndexVecIter<'_> ⓘ
Iterate over the indices as a sequence of usize
values
Trait Implementations§
Source§impl IntoIterator for IndexVec
impl IntoIterator for IndexVec
Auto Trait Implementations§
impl Freeze for IndexVec
impl RefUnwindSafe for IndexVec
impl Send for IndexVec
impl Sync for IndexVec
impl Unpin for IndexVec
impl UnwindSafe for IndexVec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more