trait FuseImpl<I> {
type Item;
// Required methods
fn next(&mut self) -> Option<Self::Item>;
fn nth(&mut self, n: usize) -> Option<Self::Item>;
fn try_fold<Acc, Fold, R>(&mut self, acc: Acc, fold: Fold) -> R
where Self: Sized,
Fold: FnMut(Acc, Self::Item) -> R,
R: Try<Output = Acc>;
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where P: FnMut(&Self::Item) -> bool;
fn next_back(&mut self) -> Option<Self::Item>
where I: DoubleEndedIterator;
fn nth_back(&mut self, n: usize) -> Option<Self::Item>
where I: DoubleEndedIterator;
fn try_rfold<Acc, Fold, R>(&mut self, acc: Acc, fold: Fold) -> R
where Self: Sized,
Fold: FnMut(Acc, Self::Item) -> R,
R: Try<Output = Acc>,
I: DoubleEndedIterator;
fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where P: FnMut(&Self::Item) -> bool,
I: DoubleEndedIterator;
}
Expand description
Fuse specialization trait
We only need to worry about &mut self
methods, which
may exhaust the iterator without consuming it.