Struct internal_iterator::Internal
source · pub struct Internal<I> { /* private fields */ }
Expand description
A wrapper type to convert std::iter::Iterator
to InternalIterator
.
Trait Implementations§
source§impl<I> InternalIterator for Internal<I>where
I: Iterator,
impl<I> InternalIterator for Internal<I>where
I: Iterator,
source§fn try_for_each<T, F>(self, consumer: F) -> ControlFlow<T>
fn try_for_each<T, F>(self, consumer: F) -> ControlFlow<T>
Applies function each elements of the iterator. Stops early if the
function returns
ControlFlow::Break
. Read moresource§fn nth(self, n: usize) -> Option<Self::Item>
fn nth(self, n: usize) -> Option<Self::Item>
Returns the
n
th element of the iterator. Read moresource§fn find_map<R, F>(self, f: F) -> Option<R>
fn find_map<R, F>(self, f: F) -> Option<R>
Applies function to the elements of iterator and returns the first
non-none result. Read more
source§fn all<F>(self, f: F) -> bool
fn all<F>(self, f: F) -> bool
Tests if every element of the iterator matches the predicate. Read more
source§fn any<F>(self, f: F) -> bool
fn any<F>(self, f: F) -> bool
Tests if any element of the iterator matches the predicate. Read more
source§fn chain<U>(
self,
other: U
) -> Chain<Self, <U as IntoInternalIterator>::IntoIter>where
U: IntoInternalIterator<Item = Self::Item>,
fn chain<U>(
self,
other: U
) -> Chain<Self, <U as IntoInternalIterator>::IntoIter>where
U: IntoInternalIterator<Item = Self::Item>,
Takes two iterators and returns an iterator that first iterates over the
elements of the first iterator, and then over the second one. Read more
source§fn cloned<'a, T>(self) -> Cloned<Self>
fn cloned<'a, T>(self) -> Cloned<Self>
Creates an iterator yields cloned elements of the original iterator. Read more
source§fn collect<B>(self) -> Bwhere
B: FromInternalIterator<Self::Item>,
fn collect<B>(self) -> Bwhere
B: FromInternalIterator<Self::Item>,
Transforms the iterator into a collection. Read more
source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
Creates an iterator yields copied elements of the original iterator. Read more
source§fn enumerate(self) -> Enumerate<Self>
fn enumerate(self) -> Enumerate<Self>
Creates an iterator that adds the index to every value of the original
iterator. Read more
source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Creates an iterator which only yields elements matching the predicate. Read more
source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
source§fn find<F>(self, f: F) -> Option<Self::Item>
fn find<F>(self, f: F) -> Option<Self::Item>
Returns the first element of the iterator that matches the predicate. Read more
source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F>
Creates and iterator which maps over the elements and flattens the
resulting structure. Read more
source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
Folds every element into an accumulator by applying an operation, returning the final result. Read more
source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Run the closure on each element, while passing that element on. Read more
source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
Returns the maximum element of an iterator using a custom comparer
function.
source§fn max_by_key<B: Ord>(
self,
key: impl FnMut(&Self::Item) -> B
) -> Option<Self::Item>
fn max_by_key<B: Ord>( self, key: impl FnMut(&Self::Item) -> B ) -> Option<Self::Item>
Returns the element that gives the maximum value from the specified function.
source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
Returns the minimum element of an iterator using a custom comparer
function.
source§fn min_by_key<B: Ord>(
self,
key: impl FnMut(&Self::Item) -> B
) -> Option<Self::Item>
fn min_by_key<B: Ord>( self, key: impl FnMut(&Self::Item) -> B ) -> Option<Self::Item>
Returns the element that gives the minimum value from the specified function.
Auto Trait Implementations§
impl<I> RefUnwindSafe for Internal<I>where
I: RefUnwindSafe,
impl<I> Send for Internal<I>where
I: Send,
impl<I> Sync for Internal<I>where
I: Sync,
impl<I> Unpin for Internal<I>where
I: Unpin,
impl<I> UnwindSafe for Internal<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> IntoInternalIterator for Iwhere
I: InternalIterator,
impl<I> IntoInternalIterator for Iwhere
I: InternalIterator,
§type Item = <I as InternalIterator>::Item
type Item = <I as InternalIterator>::Item
The type of the elements being iterated over.
source§fn into_internal_iter(self) -> <I as IntoInternalIterator>::IntoIter
fn into_internal_iter(self) -> <I as IntoInternalIterator>::IntoIter
Convert this type to an internal iterator.