Trait calc_lib::lending_iterator::LendingIterator
source · pub trait LendingIterator {
type Item<'a>
where Self: 'a;
// Required method
fn lend_next(&mut self) -> Option<Self::Item<'_>>;
// Provided methods
fn size_hint(&self) -> (usize, Option<usize>) { ... }
fn count(self) -> usize
where Self: Sized { ... }
fn advance_by(&mut self, n: usize) -> Result<(), usize> { ... }
fn by_ref(&mut self) -> &mut Self
where Self: Sized { ... }
fn lend_try_fold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E>
where Self: Sized,
F: FnMut(B, Self::Item<'_>) -> Result<B, E> { ... }
fn lend_fold<B, F>(self, init: B, f: F) -> B
where Self: Sized,
F: FnMut(B, Self::Item<'_>) -> B { ... }
}Expand description
Generalizes Iterator by allowing one to yield references.
Required Associated Types§
sourcetype Item<'a>
where
Self: 'a
type Item<'a> where Self: 'a
Read Iterator::Item.
Required Methods§
sourcefn lend_next(&mut self) -> Option<Self::Item<'_>>
fn lend_next(&mut self) -> Option<Self::Item<'_>>
Read Iterator::next.
Provided Methods§
sourcefn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere Self: Sized,
Read Iterator::count.
sourcefn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,
Read Iterator::by_ref.