Struct lending_iterator::lending_iterator::constructors::FromIter
source · #[repr(transparent)]pub struct FromIter<I: ?Sized + Iterator>(pub I);
Expand description
Note: since this wrapper only exists to avoid coherence issues,
it is guaranteed to be a #[repr(transparent)]
wrapper around its
inner I
.
This is a property unsafe
code can rely on: it can thus use transmute to
construct it.
It is also a property that will be upheld within future versions (should this property ever be broken in the future, the change would then be a semver-breaking one, and the type would be renamed to avoid footguns).
Tuple Fields§
§0: I
Trait Implementations§
source§impl<I: ?Sized + Iterator> LendingIterator for FromIter<I>
impl<I: ?Sized + Iterator> LendingIterator for FromIter<I>
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 nth(&mut self, n: usize) -> Option<Item<'_, Self>>
fn nth(&mut self, n: usize) -> Option<Item<'_, Self>>
LendingIterator
counterpart of Iterator::nth()
.