Struct streaming_iterator::Take
[−]
[src]
pub struct Take<I> { /* fields omitted */ }
A streaming iterator which only yields a limited number of elements in a streaming iterator.
Trait Implementations
impl<I: Clone> Clone for Take<I>
[src]
fn clone(&self) -> Take<I>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<I: Debug> Debug for Take<I>
[src]
impl<I> StreamingIterator for Take<I> where
I: StreamingIterator,
[src]
I: StreamingIterator,
type Item = I::Item
The type of the elements being iterated over.
fn advance(&mut self)
[src]
Advances the iterator to the next element. Read more
fn get(&self) -> Option<&I::Item>
[src]
Returns a reference to the current element of the iterator. Read more
fn size_hint(&self) -> (usize, Option<usize>)
[src]
Returns the bounds on the remaining length of the iterator.
fn next(&mut self) -> Option<&Self::Item>
[src]
Advances the iterator and returns the next value. Read more
fn all<F>(&mut self, f: F) -> bool where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Determines if all elements of the iterator satisfy a predicate.
fn any<F>(&mut self, f: F) -> bool where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Determines if any elements of the iterator satisfy a predicate.
fn by_ref(&mut self) -> &mut Self where
Self: Sized,
[src]
Self: Sized,
Borrows an iterator, rather than consuming it. Read more
fn cloned(self) -> Cloned<Self> where
Self: Sized,
Self::Item: Clone,
[src]
Self: Sized,
Self::Item: Clone,
Produces a normal, non-streaming, iterator by cloning the elements of this iterator.
fn count(self) -> usize where
Self: Sized,
[src]
Self: Sized,
Consumes the iterator, counting the number of remaining elements and returning it.
fn filter<F>(self, f: F) -> Filter<Self, F> where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Creates an iterator which uses a closure to determine if an element should be yielded.
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, B, F> where
Self: Sized,
F: FnMut(&Self::Item) -> Option<B>,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> Option<B>,
Creates an iterator which both filters and maps by applying a closure to elements.
fn find<F>(&mut self, f: F) -> Option<&Self::Item> where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Returns the first element of the iterator that satisfies the predicate.
fn fuse(self) -> Fuse<Self> where
Self: Sized,
[src]
Self: Sized,
Creates an iterator which is "well behaved" at the beginning and end of iteration. Read more
fn map<B, F>(self, f: F) -> Map<Self, B, F> where
Self: Sized,
F: FnMut(&Self::Item) -> B,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> B,
Creates an iterator which transforms elements of this iterator by passing them to a closure.
fn map_ref<B: ?Sized, F>(self, f: F) -> MapRef<Self, F> where
Self: Sized,
F: Fn(&Self::Item) -> &B,
[src]
Self: Sized,
F: Fn(&Self::Item) -> &B,
Creates an iterator which transforms elements of this iterator by passing them to a closure. Read more
fn nth(&mut self, n: usize) -> Option<&Self::Item>
[src]
Consumes the first n
elements of the iterator, returning the next one.
fn position<F>(&mut self, f: F) -> Option<usize> where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Returns the index of the first element of the iterator matching a predicate.
fn skip(self, n: usize) -> Skip<Self> where
Self: Sized,
[src]
Self: Sized,
Creates an iterator which skips the first n
elements.
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Creates an iterator that skips initial elements matching a predicate.
fn take(self, n: usize) -> Take<Self> where
Self: Sized,
[src]
Self: Sized,
Creates an iterator which only returns the first n
elements.
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
[src]
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Creates an iterator which only returns initial elements matching a predicate.
fn rev(self) -> Rev<Self> where
Self: Sized + DoubleEndedStreamingIterator,
[src]
Self: Sized + DoubleEndedStreamingIterator,
Creates an iterator which returns elemens in the opposite order.