Struct iterative_methods::StepBy [−][src]
pub struct StepBy<I> { /* fields omitted */ }
Expand description
An iterator for stepping iterators by a custom amount.
This is a StreamingIterator version of std::iter::StepBy.
The iterator adaptor step_by(it, step) wraps a StreamingIterator. A
step
is specified and only the items located every step
are returned.
Iterator indices begin at 0, thus step_by() converts step -> step - 1
Trait Implementations
impl<I> StreamingIterator for StepBy<I> where
I: StreamingIterator,
[src]
impl<I> StreamingIterator for StepBy<I> where
I: StreamingIterator,
[src]fn get(&self) -> Option<&I::Item>
[src]
fn get(&self) -> Option<&I::Item>
[src]Returns a reference to the current element of the iterator. Read more
fn next(&mut self) -> Option<&Self::Item>
[src]
fn next(&mut self) -> Option<&Self::Item>
[src]Advances the iterator and returns the next value. Read more
fn size_hint(&self) -> (usize, Option<usize>)
[src]
fn size_hint(&self) -> (usize, Option<usize>)
[src]Returns the bounds on the remaining length of the iterator.
fn all<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]
fn all<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]Determines if all elements of the iterator satisfy a predicate.
fn any<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]
fn any<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]Determines if any elements of the iterator satisfy a predicate.
fn chain<I>(self, other: I) -> Chain<Self, I> where
I: StreamingIterator<Item = Self::Item>,
[src]
fn chain<I>(self, other: I) -> Chain<Self, I> where
I: StreamingIterator<Item = Self::Item>,
[src]Consumes two iterators and returns a new iterator that iterates over both in sequence.
fn cloned(self) -> Cloned<Self> where
Self::Item: Clone,
[src]
fn cloned(self) -> Cloned<Self> where
Self::Item: Clone,
[src]Produces a normal, non-streaming, iterator by cloning the elements of this iterator.
fn count(self) -> usize
[src]
fn count(self) -> usize
[src]Consumes the iterator, counting the number of remaining elements and returning it.
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]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
F: FnMut(&Self::Item) -> Option<B>,
[src]
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, B, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]Creates an iterator which both filters and maps by applying a closure to elements.
fn flat_map<J, F>(self, f: F) -> FlatMap<Self, J, F> where
F: FnMut(&Self::Item) -> J,
J: StreamingIterator,
[src]
fn flat_map<J, F>(self, f: F) -> FlatMap<Self, J, F> where
F: FnMut(&Self::Item) -> J,
J: StreamingIterator,
[src]Creates an iterator which flattens iterators obtained by applying a closure to elements. Note that the returned iterators must be streaming iterators. Read more
fn filter_map_deref<B, F>(self, f: F) -> FilterMapDeref<Self, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]
fn filter_map_deref<B, F>(self, f: F) -> FilterMapDeref<Self, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]Creates a regular, non-streaming iterator which both filters and maps by applying a closure to elements.
fn find<F>(&mut self, f: F) -> Option<&Self::Item> where
F: FnMut(&Self::Item) -> bool,
[src]
fn find<F>(&mut self, f: F) -> Option<&Self::Item> where
F: FnMut(&Self::Item) -> bool,
[src]Returns the first element of the iterator that satisfies the predicate.
fn fuse(self) -> Fuse<Self>
[src]
fn fuse(self) -> Fuse<Self>
[src]Creates an iterator which is “well behaved” at the beginning and end of iteration. Read more
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[src]
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[src]Call a closure on each element, passing the element on.
The closure is called upon calls to advance
or advance_back
, and exactly once per element
regardless of how many times (if any) get
is called. Read more
fn map<B, F>(self, f: F) -> Map<Self, B, F> where
F: FnMut(&Self::Item) -> B,
[src]
fn map<B, F>(self, f: F) -> Map<Self, B, F> where
F: FnMut(&Self::Item) -> B,
[src]Creates an iterator which transforms elements of this iterator by passing them to a closure.
fn map_deref<B, F>(self, f: F) -> MapDeref<Self, F> where
F: FnMut(&Self::Item) -> B,
[src]
fn map_deref<B, F>(self, f: F) -> MapDeref<Self, F> where
F: FnMut(&Self::Item) -> B,
[src]Creates a regular, non-streaming iterator which transforms elements of this iterator by passing them to a closure.
fn map_ref<B, F>(self, f: F) -> MapRef<Self, F> where
F: Fn(&Self::Item) -> &B,
B: ?Sized,
[src]
fn map_ref<B, F>(self, f: F) -> MapRef<Self, F> where
F: Fn(&Self::Item) -> &B,
B: ?Sized,
[src]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]
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
F: FnMut(&Self::Item) -> bool,
[src]
fn position<F>(&mut self, f: F) -> Option<usize> where
F: FnMut(&Self::Item) -> bool,
[src]Returns the index of the first element of the iterator matching a predicate.
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Creates an iterator that skips initial elements matching a predicate.
fn take(self, n: usize) -> Take<Self>
[src]
fn take(self, n: usize) -> Take<Self>
[src]Creates an iterator which only returns the first n
elements.
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Creates an iterator which only returns initial elements matching a predicate.
fn rev(self) -> Rev<Self> where
Self: DoubleEndedStreamingIterator,
[src]
fn rev(self) -> Rev<Self> where
Self: DoubleEndedStreamingIterator,
[src]Creates an iterator which returns elemens in the opposite order.
Auto Trait Implementations
impl<I> RefUnwindSafe for StepBy<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I> Send for StepBy<I> where
I: Send,
I: Send,
impl<I> Sync for StepBy<I> where
I: Sync,
I: Sync,
impl<I> Unpin for StepBy<I> where
I: Unpin,
I: Unpin,
impl<I> UnwindSafe for StepBy<I> where
I: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,