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 Forget for IndexVec
impl Freeze for IndexVec
impl Move for IndexVec
impl RefUnwindSafe for IndexVec
impl Send for IndexVecwhere
RawVecInner: Send,
impl Sync for IndexVecwhere
RawVecInner: Sync,
impl Unpin for IndexVec
impl UnsafeUnpin for IndexVecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
impl UnwindSafe for IndexVecwhere
RawVecInner: UnwindSafe,
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