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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
U32
: 24 bytesUSize
: 24 bytes