Enum rand::seq::index::IndexVec [−][src]
pub enum IndexVec { // some variants omitted }
A vector of indices.
Multiple internal representations are possible.
Implementations
impl IndexVec
[src]
impl IndexVec
[src]pub fn len(&self) -> usize
[src]
Returns the number of indices
pub fn is_empty(&self) -> bool
[src]
Returns true
if the length is 0.
pub fn index(&self, index: usize) -> usize
[src]
Return the value at the given index
.
(Note: we cannot implement std::ops::Index
because of lifetime
restrictions.)
pub fn into_vec(self) -> Vec<usize>
[src]
Return result as a Vec<usize>
. Conversion may or may not be trivial.
pub fn iter(&self) -> IndexVecIter<'_>ⓘNotable traits for IndexVecIter<'a>
impl<'a> Iterator for IndexVecIter<'a> type Item = usize;
[src]
Notable traits for IndexVecIter<'a>
impl<'a> Iterator for IndexVecIter<'a> type Item = usize;
Iterate over the indices as a sequence of usize
values
pub fn into_iter(self) -> IndexVecIntoIterⓘNotable traits for IndexVecIntoIter
impl Iterator for IndexVecIntoIter type Item = usize;
[src]
Notable traits for IndexVecIntoIter
impl Iterator for IndexVecIntoIter type Item = usize;
Convert into an iterator over the indices as a sequence of usize
values