Struct

core::iter::Take

source
forall I.
exposed struct Take {
    inner: I,
    left: usize,
}

At most left more items; the inner iterator is not pulled past them, nor again once it has run out (left drops to 0).

Instances

instance Iterator[Take[I] -> T]source

forall I, T where Iterator[I -> T].
instance Iterator[Take[I] -> T] { ... }

In core::iter.

take: the next item while any of the count is left.