Struct lending_iterator::lending_iterator::adapters::Map
source · pub struct Map<I, F, NewItemType>where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>,{ /* private fields */ }
Expand description
The impl LendingIterator
returned by
.map()
.
Trait Implementations§
source§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>,
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 = <NewItemType as WithLifetime<'next>>::T
type T = <NewItemType as WithLifetime<'next>>::T
The “output” of this whole hand-rolled GAT:
think of
LendingIteratorඞItem<'lt>::T
as of LendingIterator::Item<'lt>
. Read moresource§impl<I, NewItemType, F> LendingIterator for Map<I, F, NewItemType>where
I: LendingIterator,
NewItemType: HKT,
for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>,
impl<I, NewItemType, F> LendingIterator for Map<I, F, NewItemType>where I: LendingIterator, NewItemType: HKT, for<'any> F: FnMut([&'any I; 0], Item<'any, I>) -> Feed<'any, NewItemType>,
source§fn filter<F>(self, should_yield: F) -> Filter<Self, F> ⓘwhere
Self: Sized,
F: FnMut(&Item<'_, Self>) -> bool,
fn filter<F>(self, should_yield: F) -> Filter<Self, F> ⓘwhere Self: Sized, F: FnMut(&Item<'_, Self>) -> bool,
LendingIterator
counterpart of Iterator::filter()
.source§fn 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()
.source§fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Accwhere
Self: Sized,
fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Item<'_, Self>) -> Acc) -> Accwhere Self: Sized,
LendingIterator
counterpart of Iterator::fold()
.source§fn 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()
.source§fn 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()
.source§fn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> boolwhere
Self: Sized,
fn all(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> boolwhere Self: Sized,
LendingIterator
counterpart of Iterator::all()
.source§fn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> boolwhere
Self: Sized,
fn any(&mut self, predicate: impl FnMut(Item<'_, Self>) -> bool) -> boolwhere Self: Sized,
LendingIterator
counterpart of Iterator::any()
.source§fn by_ref(&mut self) -> &mut Self ⓘwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Self ⓘwhere Self: Sized,
LendingIterator
counterpart of Iterator::by_ref()
.source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere Self: Sized,
LendingIterator
counterpart of Iterator::count()
.source§fn 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()
.source§fn fuse(self) -> Fuse<Self> ⓘwhere
Self: Sized,
fn fuse(self) -> Fuse<Self> ⓘwhere Self: Sized,
LendingIterator
counterpart of Iterator::fuse()
.source§fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
LendingIterator
counterpart of Iterator::nth()
.source§fn 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()
.source§fn skip(self, count: usize) -> Skip<Self> ⓘwhere
Self: Sized,
fn skip(self, count: usize) -> Skip<Self> ⓘwhere Self: Sized,
LendingIterator
counterpart of Iterator::skip()
.source§fn take(self, count: usize) -> Take<Self> ⓘwhere
Self: Sized,
fn take(self, count: usize) -> Take<Self> ⓘwhere Self: Sized,
LendingIterator
counterpart of Iterator::take()
.source§fn map<NewItemType: HKT, F>(self, f: F) -> Map<Self, F, 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> ⓘwhere for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Feed<'next, NewItemType>, Self: Sized,
source§fn map_to_ref<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRef<R>> ⓘ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>> ⓘwhere for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any R, Self: Sized,
source§fn map_to_mut<R: ?Sized, F>(self, f: F) -> Map<Self, F, HKTRefMut<R>> ⓘ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>> ⓘwhere for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> &'any mut R, Self: Sized,
source§fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F> ⓘwhere
F: FnMut(Item<'_, Self>) -> NonLendingItem,
Self: Sized,
fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F> ⓘwhere F: FnMut(Item<'_, Self>) -> NonLendingItem, Self: Sized,
Convenience shorthand for
.map…(…).into_iter()
. Read moresource§fn filter_map<NewItemType: HKT, F>(
self,
f: F
) -> FilterMap<Self, F, 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> ⓘwhere for<'next> F: FnMut([&'next Self; 0], Item<'next, Self>) -> Option<Feed<'next, NewItemType>>, Self: Sized,
source§fn filter_map_to_ref<R: ?Sized, F>(self, f: F) -> FilterMap<Self, F, HKTRef<R>> ⓘ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>> ⓘwhere for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any R>, Self: Sized,
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRef<R> = HKT!(&R)
. Read moresource§fn filter_map_to_mut<R: ?Sized, F>(
self,
f: F
) -> FilterMap<Self, F, HKTRefMut<R>> ⓘ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>> ⓘwhere for<'any> F: FnMut([&'any Self; 0], Item<'any, Self>) -> Option<&'any mut R>, Self: Sized,
Convenience method: same as
.filter_map()
, but for hard-coding the
HKT
parameter to HKTRefMut<R> = HKT!(&mut R)
. Read moresource§fn filter_map_into_iter<F, NonLendingItem>(
self,
f: F
) -> FilterMapIntoIter<Self, F> ⓘwhere
F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>,
Self: Sized,
fn filter_map_into_iter<F, NonLendingItem>( self, f: F ) -> FilterMapIntoIter<Self, F> ⓘwhere F: FnMut(Item<'_, Self>) -> Option<NonLendingItem>, Self: Sized,
Convenience shorthand for
.filter_map…(…).into_iter()
. Read moresource§fn into_iter<Item>(self) -> IntoIter<Self> ⓘwhere
Self: for<'any> LendingIteratorඞItem<'any, T = Item> + Sized,
fn into_iter<Item>(self) -> IntoIter<Self> ⓘwhere Self: for<'any> LendingIteratorඞItem<'any, T = Item> + Sized,
source§fn dyn_boxed<'usability>(
self
) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>where
Self: 'usability + Sized,
fn dyn_boxed<'usability>( self ) -> Box<dyn LendingIteratorDyn<Item = HKTItem<Self>> + 'usability>where Self: 'usability + Sized,
Available on crate feature
alloc
only.source§fn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>(
self
) -> BoxedDynLendingIteratorwhere
Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
fn dyn_boxed_auto<BoxedDynLendingIterator, Item: HKT>( self ) -> BoxedDynLendingIteratorwhere Self: Sized + DynCoerce<BoxedDynLendingIterator, Item>,
Available on crate feature
alloc
only.