pub struct Flatten<I> { /* private fields */ }Trait Implementations§
Source§impl<I: PopulatedIterator> IntoIterator for Flatten<I>where
I::Item: IntoPopulatedIterator,
impl<I: PopulatedIterator> IntoIterator for Flatten<I>where
I::Item: IntoPopulatedIterator,
Source§type Item = <<I as IntoIterator>::Item as IntoIterator>::Item
type Item = <<I as IntoIterator>::Item as IntoIterator>::Item
The type of the elements being iterated over.
Source§impl<I: PopulatedIterator> PopulatedIterator for Flatten<I>where
I::Item: IntoPopulatedIterator,
impl<I: PopulatedIterator> PopulatedIterator for Flatten<I>where
I::Item: IntoPopulatedIterator,
Source§fn next(self) -> (Self::Item, Self::IntoIter)
fn next(self) -> (Self::Item, Self::IntoIter)
Advances the iterator and returns the first value and a new iterator
to the remaining values.
Source§fn collect<C: FromPopulatedIterator<Self::Item>>(self) -> Cwhere
Self: Sized,
fn collect<C: FromPopulatedIterator<Self::Item>>(self) -> Cwhere
Self: Sized,
Collects the iterator into a collection. Supports constructing
collections that require a populated iterator.
Source§fn map<B, F: FnMut(Self::Item) -> B>(self, f: F) -> Map<Self, F>where
Self: Sized,
fn map<B, F: FnMut(Self::Item) -> B>(self, f: F) -> Map<Self, F>where
Self: Sized,
Takes a closure and creates an iterator which calls that closure on
each element. Preserves the populated property.
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates an iterator giving the current element count along with the
element. Preserves the populated property.
Source§fn zip<J>(self, other: J) -> Zip<Self, J>where
Self: Sized,
fn zip<J>(self, other: J) -> Zip<Self, J>where
Self: Sized,
Zips this iterator with another iterator to yield a new iterator of
pairs. Preserves the populated property.
Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Flattens a populated iterator of populated iteratorables into a single iterator. Preserves
the populated property.
Source§fn take(self, n: NonZeroUsize) -> Take<Self>where
Self: Sized,
fn take(self, n: NonZeroUsize) -> Take<Self>where
Self: Sized,
Creates an iterator taking at most
n elements from this iterator, where n is non-zero.
Preserves the populated property.Source§fn flat_map<B: IntoPopulatedIterator, F: FnMut(Self::Item) -> B>(
self,
f: F,
) -> Flatten<Map<Self, F>>where
Self: Sized,
fn flat_map<B: IntoPopulatedIterator, F: FnMut(Self::Item) -> B>(
self,
f: F,
) -> Flatten<Map<Self, F>>where
Self: Sized,
Creates an iterator that works like
map, but flattens nested populated structure. Preserves the
populated property.Source§fn max(self) -> Self::Item
fn max(self) -> Self::Item
Returns the maximum element of the iterator. Note that unlike the standard library, this
method directly returns the maximum element instead of an
Option. This is because this
method is only available on populated iterators.Source§fn chain<I: IntoIterator<Item = Self::Item>>(
self,
other: I,
) -> Chain<Self, I::IntoIter>where
Self: Sized,
fn chain<I: IntoIterator<Item = Self::Item>>(
self,
other: I,
) -> Chain<Self, I::IntoIter>where
Self: Sized,
Takes self populator and another iteratorable and creates a new iterator over both in sequence. Preserves the populated property.
Source§fn reduce(
self,
f: impl FnMut(Self::Item, Self::Item) -> Self::Item,
) -> Self::Itemwhere
Self: Sized,
fn reduce(
self,
f: impl FnMut(Self::Item, Self::Item) -> Self::Item,
) -> Self::Itemwhere
Self: Sized,
Reduces the iterator to a single value using a closure. Note that unlike the standard library,
this method directly returns the reduced value instead of an
Option. This is because this
method is only available on populated iterators.Source§fn max_by_key<K: Ord>(self, f: impl FnMut(&Self::Item) -> K) -> Self::Itemwhere
Self: Sized,
fn max_by_key<K: Ord>(self, f: impl FnMut(&Self::Item) -> K) -> Self::Itemwhere
Self: Sized,
Returns the element that gives the maximum value from the specified function. Note that unlike the standard library,
this method directly returns the maximum element instead of an
Option. This is because this
method is only available on populated iterators.Source§fn max_by(
self,
compare: impl FnMut(&Self::Item, &Self::Item) -> Ordering,
) -> Self::Itemwhere
Self: Sized,
fn max_by(
self,
compare: impl FnMut(&Self::Item, &Self::Item) -> Ordering,
) -> Self::Itemwhere
Self: Sized,
Returns the element that gives the maximum value with respect to the specified comparison function. Note that unlike the standard library,
this method directly returns the maximum element instead of an
Option. This is because this
method is only available on populated iterators.Source§fn min_by_key<K: Ord>(self, f: impl FnMut(&Self::Item) -> K) -> Self::Itemwhere
Self: Sized,
fn min_by_key<K: Ord>(self, f: impl FnMut(&Self::Item) -> K) -> Self::Itemwhere
Self: Sized,
Returns the element that gives the minimum value from the specified function. Note that unlike the standard library,
this method directly returns the minimum element instead of an
Option. This is because this
method is only available on populated iterators.Source§fn min_by(
self,
compare: impl FnMut(&Self::Item, &Self::Item) -> Ordering,
) -> Self::Itemwhere
Self: Sized,
fn min_by(
self,
compare: impl FnMut(&Self::Item, &Self::Item) -> Ordering,
) -> Self::Itemwhere
Self: Sized,
Returns the element that gives the minimum value with respect to the specified comparison function. Note that unlike the standard library,
this method directly returns the minimum element instead of an
Option. This is because this
method is only available on populated iterators.fn eq<I: IntoIterator>(self, other: I) -> bool
fn last(self) -> Self::Itemwhere
Self: Sized,
fn rev(self) -> Rev<Self>where
Self: Sized,
fn nth(self, n: usize) -> (Option<Self::Item>, Self::IntoIter)where
Self: Sized,
fn count(self) -> NonZeroUsizewhere
Self: Sized,
Auto Trait Implementations§
impl<I> Freeze for Flatten<I>where
I: Freeze,
impl<I> RefUnwindSafe for Flatten<I>where
I: RefUnwindSafe,
impl<I> Send for Flatten<I>where
I: Send,
impl<I> Sync for Flatten<I>where
I: Sync,
impl<I> Unpin for Flatten<I>where
I: Unpin,
impl<I> UnwindSafe for Flatten<I>where
I: 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
Source§impl<I> IntoPopulatedIterator for Iwhere
I: PopulatedIterator,
impl<I> IntoPopulatedIterator for Iwhere
I: PopulatedIterator,
type PopulatedIntoIter = I
Source§fn into_populated_iter(self) -> <I as IntoPopulatedIterator>::PopulatedIntoIter
fn into_populated_iter(self) -> <I as IntoPopulatedIterator>::PopulatedIntoIter
Converts the type into a
PopulatedIterator.