pub trait SelectIndices<'a> {
    fn select_with_iter<Indices>(
        &'a self,
        indices: Indices
    ) -> SelectIndicesIter<'a, Self, Indices::IntoIter, Sequential, Unindexed>
    where
        Indices: IntoIterator,
        Indices::Item: Copy,
        Self: Index<Indices::Item>
, { ... }
fn select_indices<Idx>(
        &'a self,
        indices: &'a [Idx]
    ) -> SelectIndicesIter<'a, Self, Copied<Iter<'a, Idx>>, Sequential, Unindexed>
    where
        Self: Index<Idx>,
        Idx: Copy
, { ... } }
Expand description

Selectively iterate through a collection with a list of indices or an index iterator.

SelectIndices does not require Index types to implement OneToOne because having multiple immutable references to an object is valid in Rust.

Provided methods

Iterate through a collection with an iterator that produces indices.

Iterate through a collection with a slice of indices.

This is just an alias for data.select_with_iter(indices.iter().copied()).

Implementors