Trait itertools::traits::IteratorIndex

source ·
pub trait IteratorIndex<I>: Sealed
where I: Iterator,
{ type Output: Iterator<Item = I::Item>; // Required method fn index(self, from: I) -> Self::Output; }
Expand description

Used by Itertools::get to know which iterator to turn different ranges into.

Required Associated Types§

source

type Output: Iterator<Item = I::Item>

The type returned for this type of index.

Required Methods§

source

fn index(self, from: I) -> Self::Output

Returns an adapted iterator for the current index.

Prefer calling Itertools::get instead of calling this directly.

Implementations on Foreign Types§

source§

impl<I> IteratorIndex<I> for Range<usize>
where I: Iterator,

§

type Output = Skip<Take<I>>

source§

fn index(self, iter: I) -> Self::Output

source§

impl<I> IteratorIndex<I> for RangeFrom<usize>
where I: Iterator,

§

type Output = Skip<I>

source§

fn index(self, iter: I) -> Self::Output

source§

impl<I> IteratorIndex<I> for RangeFull
where I: Iterator,

§

type Output = I

source§

fn index(self, iter: I) -> Self::Output

source§

impl<I> IteratorIndex<I> for RangeInclusive<usize>
where I: Iterator,

§

type Output = Take<Skip<I>>

source§

fn index(self, iter: I) -> Self::Output

source§

impl<I> IteratorIndex<I> for RangeTo<usize>
where I: Iterator,

§

type Output = Take<I>

source§

fn index(self, iter: I) -> Self::Output

source§

impl<I> IteratorIndex<I> for RangeToInclusive<usize>
where I: Iterator,

§

type Output = Take<I>

source§

fn index(self, iter: I) -> Self::Output

Implementors§