pub struct Chain<I1, I2> { /* private fields */ }
Expand description
See Iterator::chain
Trait Implementations§
Source§impl<'b, I1, I2> Iterator for Chain<I1, I2>
impl<'b, I1, I2> Iterator for Chain<I1, I2>
Source§type Item<'a> = <I1 as Iterator>::Item<'a>
where
Self: 'a
type Item<'a> = <I1 as Iterator>::Item<'a> where Self: 'a
The value yielded by each call to
next
on this iteratorSource§fn next(&mut self) -> Option<Self::Item<'_>>
fn next(&mut self) -> Option<Self::Item<'_>>
Get the next value of this iterator, or return
None
Source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Get a hint as to the size of this iterator - the first value is a lower bound, second
is an optional upper bound.
Source§fn nth(&mut self, n: usize) -> Option<Self::Item<'_>>
fn nth(&mut self, n: usize) -> Option<Self::Item<'_>>
Return the
n
th element of the iterator Read moreSource§fn map<O, F>(self, f: F) -> Map<Self, F> ⓘ
fn map<O, F>(self, f: F) -> Map<Self, F> ⓘ
Take a closure which will take each value from the iterator, and yield a new value computed
from it. Read more
Source§fn touch<F>(self, f: F) -> Touch<Self, F>
fn touch<F>(self, f: F) -> Touch<Self, F>
Gain mutable access to each value in this iterator, then yield it to the next step.
This allows altering each item without consuming it, preserving the lending nature
or the iterator
Source§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
Execute a closure on each item in the iterator, returning true if it should be included, or
false to skip it
Source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
Creates an iterator starting at the same point, but stepping by the given amount at each
iteration
Source§fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter>
fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter>
Takes two iterators and creates a new iterator over both in sequence
Source§fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter>where
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter>where
Self: Sized,
U: IntoIterator,
‘Zips up’ two iterators into a single iterator of pairs
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates an iterator which gives the current iteration count as well as the next value
Source§fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
Creates an iterator that skips elements based on a predicate
Source§fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
Creates an iterator that yields elements based on a predicate
Source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Creates an iterator that skips the first n elements
Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Creates an iterator that yields the first n elements, or fewer if the underlying iterator
ends sooner
Source§fn find<F>(&mut self, f: F) -> Option<Self::Item<'_>>
fn find<F>(&mut self, f: F) -> Option<Self::Item<'_>>
Searches for an element of an iterator that satisfies a predicate
Source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
Consume the iterator, counting the number of items and returning it
Source§fn fold<T, F>(self, acc: T, f: F) -> T
fn fold<T, F>(self, acc: T, f: F) -> T
Execute a closure on each value of this iterator, with an additional ‘accumulator’ value
passed to each call. The closure is expected to return the new value of the accumulator.
Source§fn scan<T, B, F>(self, acc: T, f: F) -> Scan<Self, T, F> ⓘ
fn scan<T, B, F>(self, acc: T, f: F) -> Scan<Self, T, F> ⓘ
Execute a closure on each value of this iterator, with an additional state value passed
via mutable reference to each call. The closure is expected to return the new value
for each step of the iterator, if the returned value is
None
the iterator stops early. Read moreAuto Trait Implementations§
impl<I1, I2> Freeze for Chain<I1, I2>
impl<I1, I2> RefUnwindSafe for Chain<I1, I2>where
I1: RefUnwindSafe,
I2: RefUnwindSafe,
impl<I1, I2> Send for Chain<I1, I2>
impl<I1, I2> Sync for Chain<I1, I2>
impl<I1, I2> Unpin for Chain<I1, I2>
impl<I1, I2> UnwindSafe for Chain<I1, I2>where
I1: UnwindSafe,
I2: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more