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>where
F: FnMut(Self::Item) -> ControlFlow<T>,
fn try_for_each<T, F>(self, consumer: F) -> ControlFlow<T>where F: FnMut(Self::Item) -> 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>where
F: FnMut(Self::Item) -> Option<R>,
fn find_map<R, F>(self, f: F) -> Option<R>where F: FnMut(Self::Item) -> 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) -> boolwhere
F: FnMut(Self::Item) -> bool,
fn all<F>(self, f: F) -> boolwhere F: FnMut(Self::Item) -> bool,
Tests if every element of the iterator matches the predicate. Read more
source§fn any<F>(self, f: F) -> boolwhere
F: FnMut(Self::Item) -> bool,
fn any<F>(self, f: F) -> boolwhere F: FnMut(Self::Item) -> 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>where
Self: InternalIterator<Item = &'a T>,
T: Clone + 'a,
fn cloned<'a, T>(self) -> Cloned<Self>where Self: InternalIterator<Item = &'a T>, T: Clone + 'a,
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>where
Self: InternalIterator<Item = &'a T>,
T: Copy + 'a,
fn copied<'a, T>(self) -> Copied<Self>where Self: InternalIterator<Item = &'a T>, T: Copy + 'a,
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>where
P: FnMut(&Self::Item) -> bool,
fn filter<P>(self, predicate: P) -> Filter<Self, P>where P: FnMut(&Self::Item) -> bool,
Creates an iterator which only yields elements matching the predicate. Read more
source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where F: FnMut(Self::Item) -> Option<T>,
source§fn find<F>(self, f: F) -> Option<Self::Item>where
F: FnMut(&Self::Item) -> bool,
fn find<F>(self, f: F) -> Option<Self::Item>where F: FnMut(&Self::Item) -> bool,
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>where
F: FnMut(Self::Item) -> U,
U: IntoInternalIterator,
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F>where F: FnMut(Self::Item) -> U, U: IntoInternalIterator,
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) -> Bwhere
F: FnMut(B, Self::Item) -> B,
fn fold<B, F>(self, init: B, f: F) -> Bwhere F: FnMut(B, Self::Item) -> 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>where
F: FnMut(&Self::Item),
fn inspect<F>(self, f: F) -> Inspect<Self, F>where F: FnMut(&Self::Item),
Run the closure on each element, while passing that element on. Read more
source§fn map<F, T>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
fn map<F, T>(self, f: F) -> Map<Self, F>where F: FnMut(Self::Item) -> T,
Transform each element in the iterator. Read more
source§fn max_by<F>(self, compare: F) -> Option<Self::Item>where
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, compare: F) -> Option<Self::Item>where F: FnMut(&Self::Item, &Self::Item) -> Ordering,
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>where
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, compare: F) -> Option<Self::Item>where F: FnMut(&Self::Item, &Self::Item) -> Ordering,
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.