Trait select_indices::SelectIndices
source · [−]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
Provided methods
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_with_iter<Indices>(
&'a self,
indices: Indices
) -> SelectIndicesIter<'a, Self, Indices::IntoIter, Sequential, Unindexed> where
Indices: IntoIterator,
Indices::Item: Copy,
Self: Index<Indices::Item>,
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())
.