pub trait LendingIteratorDyn {
type Item: ?Sized + HKT;
fn dyn_next(&mut self) -> Option<Feed<'_, Self::Item>>;
}
Expand description
dyn
-friendly (dyn
-safe) version of LendingIterator
.
It is automagically implemented for all types implementing
LendingIterator
, and, conversely, LendingIterator
is implemented for
dyn LendingIteratorDyn
.
Limitations
Beware that such a trait does still not play well with contexts which are generic over the “lending mode” ⚠️
So, if you intend to unify two heterogeneous LendingIterator
under the
same dyn LendingIteratorDyn
, make sure to hard-code the
dependency on the 'next
-lending lifetime.
Otherwise you might have to:
- involve
CanonicalHKT
in your signatures, - and use
.dyn_boxed_auto()
rather than the.dyn_boxed()
direct shorthand.
Example: dyn
coercion of a fully generic LendingIterator
:
-
use ::lending_iterator::prelude::*; fn coercions<'T, Item, T> (it: T) where Item : HKT, T : 'T + Send + Sync + LendingIterator, // THIS IS THE BOUND THAT YOU HAVE TO ADD TO MAKE IT WORK, for some reason: T : LendingIteratorDyn<Item = CanonicalHKT<Item>>, // 👈 { match () { _ => { let _: Box<dyn 'T + LendingIteratorDyn<Item = CanonicalHKT<Item>>> = it.dyn_boxed_auto() ; }, _ => { let _: Box<dyn 'T + LendingIteratorDyn<Item = CanonicalHKT<Item>> + Send> = it.dyn_boxed_auto() ; }, _ => { let _: Box<dyn 'T + LendingIteratorDyn<Item = CanonicalHKT<Item>> + Sync> = it.dyn_boxed_auto() ; }, _ => { let _: Box<dyn 'T + LendingIteratorDyn<Item = CanonicalHKT<Item>> + Send + Sync> = it.dyn_boxed_auto() ; }, } }
Required Associated Types
Required Methods
A dyn
-safe version of LendingIterator::next()
, using
[Self::Item]
.
Given that LendingIteratorDyn : LendingIterator
, you
should not need to call this function directly: calling .next()
ought
to work just as well.
- That being said, if defining a
LendingIteratorDyn
subtrait, you may then need to directly call into it.
Trait Implementations
sourceimpl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + 'usability
impl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + 'usability
dyn LendingIteratorDyn + … : LendingIterator
sourcefn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + 'usability)
) -> Option<Feed<'next, Item>>
fn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + 'usability)
) -> Option<Feed<'next, Item>>
Query the next()
Item
of this Self
iterator. Read more
sourcefn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
fn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::filter()
.
sourcefn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
fn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
LendingIterator
counterpart of Iterator::for_each()
.
sourcefn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
LendingIterator
counterpart of Iterator::fold()
.
sourcefn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
fn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
LendingIterator
counterpart of Iterator::try_for_each()
.
sourcefn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
fn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
LendingIterator
counterpart of Iterator::try_fold()
.
sourcefn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::all()
.
sourcefn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::any()
.
sourcefn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
I: Unpin, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::by_ref()
.
sourcefn count(self) -> usize where
Self: Sized,
fn count(self) -> usize where
Self: Sized,
LendingIterator
counterpart of Iterator::count()
.
sourcefn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
fn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
LendingIterator
counterpart of Iterator::find()
.
sourcefn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
fn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::fuse()
.
sourcefn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
LendingIterator
counterpart of Iterator::nth()
.
sourcefn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
fn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
LendingIterator
counterpart of Iterator::position()
.
sourcefn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
fn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::skip()
.
sourcefn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
fn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::take()
.
sourcefn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
fn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::map()
. Read more
sourcefn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
fn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
fn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
Convenience shorthand for
.map…(…).into_iter()
. Read more
sourcefn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
fn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::filter_map()
. Read more
sourcefn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
fn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRef<R> = HKT!(&R)
. Read more
sourcefn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
fn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRefMut<R> = HKT!(&mut R)
. Read more
sourcefn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
fn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
Convenience shorthand for
.filter_map…(…).into_iter()
. Read more
sourcefn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
fn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
Convert a Self : LendingIterator
into an Iterator
,
provided Self::Item<'_>
does not depend on '_
. Read more
sourcefn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
fn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourcefn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
fn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourceimpl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + Send + 'usability
impl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + Send + 'usability
dyn LendingIteratorDyn + … : LendingIterator
sourcefn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + Send + 'usability)
) -> Option<Feed<'next, Item>>
fn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + Send + 'usability)
) -> Option<Feed<'next, Item>>
Query the next()
Item
of this Self
iterator. Read more
sourcefn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
fn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::filter()
.
sourcefn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
fn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
LendingIterator
counterpart of Iterator::for_each()
.
sourcefn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
LendingIterator
counterpart of Iterator::fold()
.
sourcefn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
fn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
LendingIterator
counterpart of Iterator::try_for_each()
.
sourcefn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
fn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
LendingIterator
counterpart of Iterator::try_fold()
.
sourcefn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::all()
.
sourcefn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::any()
.
sourcefn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
I: Unpin, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::by_ref()
.
sourcefn count(self) -> usize where
Self: Sized,
fn count(self) -> usize where
Self: Sized,
LendingIterator
counterpart of Iterator::count()
.
sourcefn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
fn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
LendingIterator
counterpart of Iterator::find()
.
sourcefn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
fn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::fuse()
.
sourcefn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
LendingIterator
counterpart of Iterator::nth()
.
sourcefn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
fn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
LendingIterator
counterpart of Iterator::position()
.
sourcefn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
fn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::skip()
.
sourcefn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
fn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::take()
.
sourcefn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
fn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::map()
. Read more
sourcefn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
fn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
fn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
Convenience shorthand for
.map…(…).into_iter()
. Read more
sourcefn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
fn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::filter_map()
. Read more
sourcefn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
fn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRef<R> = HKT!(&R)
. Read more
sourcefn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
fn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRefMut<R> = HKT!(&mut R)
. Read more
sourcefn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
fn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
Convenience shorthand for
.filter_map…(…).into_iter()
. Read more
sourcefn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
fn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
Convert a Self : LendingIterator
into an Iterator
,
provided Self::Item<'_>
does not depend on '_
. Read more
sourcefn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
fn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourcefn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
fn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourceimpl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + Send + Sync + 'usability
impl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + Send + Sync + 'usability
dyn LendingIteratorDyn + … : LendingIterator
sourcefn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + Send + Sync + 'usability)
) -> Option<Feed<'next, Item>>
fn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + Send + Sync + 'usability)
) -> Option<Feed<'next, Item>>
Query the next()
Item
of this Self
iterator. Read more
sourcefn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
fn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::filter()
.
sourcefn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
fn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
LendingIterator
counterpart of Iterator::for_each()
.
sourcefn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
LendingIterator
counterpart of Iterator::fold()
.
sourcefn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
fn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
LendingIterator
counterpart of Iterator::try_for_each()
.
sourcefn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
fn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
LendingIterator
counterpart of Iterator::try_fold()
.
sourcefn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::all()
.
sourcefn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::any()
.
sourcefn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
I: Unpin, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::by_ref()
.
sourcefn count(self) -> usize where
Self: Sized,
fn count(self) -> usize where
Self: Sized,
LendingIterator
counterpart of Iterator::count()
.
sourcefn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
fn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
LendingIterator
counterpart of Iterator::find()
.
sourcefn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
fn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::fuse()
.
sourcefn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
LendingIterator
counterpart of Iterator::nth()
.
sourcefn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
fn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
LendingIterator
counterpart of Iterator::position()
.
sourcefn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
fn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::skip()
.
sourcefn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
fn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::take()
.
sourcefn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
fn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::map()
. Read more
sourcefn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
fn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
fn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
Convenience shorthand for
.map…(…).into_iter()
. Read more
sourcefn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
fn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::filter_map()
. Read more
sourcefn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
fn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRef<R> = HKT!(&R)
. Read more
sourcefn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
fn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRefMut<R> = HKT!(&mut R)
. Read more
sourcefn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
fn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
Convenience shorthand for
.filter_map…(…).into_iter()
. Read more
sourcefn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
fn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
Convert a Self : LendingIterator
into an Iterator
,
provided Self::Item<'_>
does not depend on '_
. Read more
sourcefn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
fn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourcefn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
fn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourceimpl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + Sync + 'usability
impl<'usability, Item: HKT> LendingIterator for dyn LendingIteratorDyn<Item = Item> + Sync + 'usability
dyn LendingIteratorDyn + … : LendingIterator
sourcefn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + Sync + 'usability)
) -> Option<Feed<'next, Item>>
fn next<'next>(
self: &'next mut (dyn LendingIteratorDyn<Item = Item> + Sync + 'usability)
) -> Option<Feed<'next, Item>>
Query the next()
Item
of this Self
iterator. Read more
sourcefn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
fn filter<F>(self, should_yield: F) -> Filter<Self, F>ⓘNotable traits for Filter<I, F>impl<'next, I, F> LendingIteratorඞItem<'next, &'next Filter<I, F>> for Filter<I, F> where
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
where
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
I: LendingIterator,
F: FnMut(&Item<'_, I>) -> bool, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::filter()
.
sourcefn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
fn for_each(self, f: impl FnMut(Item<'_, Self>)) where
Self: Sized,
LendingIterator
counterpart of Iterator::for_each()
.
sourcefn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Acc where
Self: Sized,
LendingIterator
counterpart of Iterator::fold()
.
sourcefn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
fn try_for_each<Err>(
&mut self,
f: impl FnMut(Item<'_, Self>) -> Result<(), Err>
) -> Result<(), Err>
LendingIterator
counterpart of Iterator::try_for_each()
.
sourcefn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
fn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Item<'_, Self>) -> Result<Acc, Err>
) -> Result<Acc, Err>
LendingIterator
counterpart of Iterator::try_fold()
.
sourcefn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::all()
.
sourcefn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
fn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> bool where
Self: Sized,
LendingIterator
counterpart of Iterator::any()
.
sourcefn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'r mut Iimpl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next &'r mut I> for &'r mut I type T = Item<'next, I>;impl<'next, 'r, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Pin<&'r mut I>> for Pin<&'r mut I> where
I: Unpin, type T = Item<'next, I>;
where
Self: Sized,
I: Unpin, type T = Item<'next, I>;
LendingIterator
counterpart of Iterator::by_ref()
.
sourcefn count(self) -> usize where
Self: Sized,
fn count(self) -> usize where
Self: Sized,
LendingIterator
counterpart of Iterator::count()
.
sourcefn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
fn find<'find>(
&'find mut self,
predicate: impl 'find + FnMut(&Item<'_, Self>) -> bool
) -> Option<Item<'find, Self>> where
Self: Sized,
LendingIterator
counterpart of Iterator::find()
.
sourcefn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
fn fuse(self) -> Fuse<Self>ⓘNotable traits for Fuse<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Fuse<I>> for Fuse<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::fuse()
.
sourcefn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
LendingIterator
counterpart of Iterator::nth()
.
sourcefn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
fn position<F>(
&mut self,
predicate: impl FnMut(Item<'_, Self>) -> bool
) -> Option<usize> where
Self: Sized,
LendingIterator
counterpart of Iterator::position()
.
sourcefn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
fn skip(self, count: usize) -> Skip<Self>ⓘNotable traits for Skip<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Skip<I>> for Skip<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::skip()
.
sourcefn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
fn take(self, count: usize) -> Take<Self>ⓘNotable traits for Take<I>impl<'next, I: LendingIterator> LendingIteratorඞItem<'next, &'next Take<I>> for Take<I> type T = Item<'next, I>;
where
Self: Sized,
LendingIterator
counterpart of Iterator::take()
.
sourcefn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
fn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, NewItemType>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::map()
. Read more
sourcefn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
fn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
fn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>>ⓘNotable traits for Map<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next Map<I, F, NewItemType>> for Map<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>, type T = Feed<'next, NewItemType>;
sourcefn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>ⓘNotable traits for MapIntoIter<I, F>impl<I, F, R> Iterator for MapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
where
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> R, type Item = R;
Convenience shorthand for
.map…(…).into_iter()
. Read more
sourcefn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
fn filter_map<NewItemType: HKT, F>(self, f: F) -> FilterMap<Self, F, NewItemType>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
LendingIterator
counterpart of Iterator::filter_map()
. Read more
sourcefn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
fn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRef<R> = HKT!(&R)
. Read more
sourcefn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
fn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>>ⓘNotable traits for FilterMap<I, F, NewItemType>impl<'next, I, NewItemType, F> LendingIteratorඞItem<'next, &'next FilterMap<I, F, NewItemType>> for FilterMap<I, F, NewItemType> where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
where
for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>,
Self: Sized,
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Option<Feed<'any, NewItemType>>, type T = Feed<'next, NewItemType>;
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRefMut<R> = HKT!(&mut R)
. Read more
sourcefn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
fn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F>ⓘNotable traits for FilterMapIntoIter<I, F>impl<I, F, R> Iterator for FilterMapIntoIter<I, F> where
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
where
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
I: LendingIterator,
F: FnMut(Item<'_, I>) -> Option<R>, type Item = R;
Convenience shorthand for
.filter_map…(…).into_iter()
. Read more
sourcefn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
fn into_iter<Item>(self) -> IntoIter<Self>ⓘNotable traits for IntoIter<I>impl<Item, I: ?Sized + LendingIterator> Iterator for IntoIter<I> where
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
where
Self: for<'any> LendingIteratorඞItem<'any, T = Item>,
Self: Sized,
for<'any> I: LendingIteratorඞItem<'any, T = Item>, type Item = Item;
Convert a Self : LendingIterator
into an Iterator
,
provided Self::Item<'_>
does not depend on '_
. Read more
sourcefn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
fn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>ⓘNotable traits for Box<I>impl<'next, I: ?Sized + LendingIterator> LendingIteratorඞItem<'next, &'next Box<I, Global>> for Box<I> type T = Item<'next, I>;
where
Self: 'usability,
Self: Sized,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourcefn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
fn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIterator where
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
alloc
only.Converts this LendingIterator
into a
Box<dyn LendingIteratorDyn…>
. Read more
sourceimpl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + 'usability)> for dyn LendingIteratorDyn<Item = Item> + 'usability
impl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + 'usability)> for dyn LendingIteratorDyn<Item = Item> + 'usability
type T = <Item as WithLifetime<'next>>::T
type T = <Item as WithLifetime<'next>>::T
The “output” of this whole hand-rolled GAT:
think of LendingIteratorඞItem<'lt>::T
as of LendingIterator::Item<'lt>
. Read more
sourceimpl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + Send + 'usability)> for dyn LendingIteratorDyn<Item = Item> + Send + 'usability
impl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + Send + 'usability)> for dyn LendingIteratorDyn<Item = Item> + Send + 'usability
type T = <Item as WithLifetime<'next>>::T
type T = <Item as WithLifetime<'next>>::T
The “output” of this whole hand-rolled GAT:
think of LendingIteratorඞItem<'lt>::T
as of LendingIterator::Item<'lt>
. Read more
sourceimpl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + Sync + 'usability)> for dyn LendingIteratorDyn<Item = Item> + Sync + 'usability
impl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + Sync + 'usability)> for dyn LendingIteratorDyn<Item = Item> + Sync + 'usability
type T = <Item as WithLifetime<'next>>::T
type T = <Item as WithLifetime<'next>>::T
The “output” of this whole hand-rolled GAT:
think of LendingIteratorඞItem<'lt>::T
as of LendingIterator::Item<'lt>
. Read more
sourceimpl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + Sync + Send + 'usability)> for dyn LendingIteratorDyn<Item = Item> + Send + Sync + 'usability
impl<'next, 'usability, Item: HKT> LendingIteratorඞItem<'next, &'next (dyn LendingIteratorDyn<Item = Item> + Sync + Send + 'usability)> for dyn LendingIteratorDyn<Item = Item> + Send + Sync + 'usability
type T = <Item as WithLifetime<'next>>::T
type T = <Item as WithLifetime<'next>>::T
The “output” of this whole hand-rolled GAT:
think of LendingIteratorඞItem<'lt>::T
as of LendingIterator::Item<'lt>
. Read more
Implementors
sourceimpl<T: LendingIterator> LendingIteratorDyn for T
impl<T: LendingIterator> LendingIteratorDyn for T
impl LendingIterator : LendingIteratorDyn