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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)