pub trait LendingIterator {
    type Item<'a>
       where Self: 'a;

    // Required method
    async fn next(&mut self) -> Option<Self::Item<'_>>;
}
Expand description

An interface for dealing with iterators which borrow from Self

Required Associated Types§

source

type Item<'a> where Self: 'a

The type of the elements being iterated over.

Required Methods§

source

async fn next(&mut self) -> Option<Self::Item<'_>>

Advances the iterator and returns the next value.

Implementors§

source§

impl<I: Iterator> LendingIterator for Lend<I>

§

type Item<'a> = (&'a I, <I as Iterator>::Item) where Self: 'a

source§

impl<I: Iterator> LendingIterator for LendMut<I>

§

type Item<'a> = (&'a mut I, <I as Iterator>::Item) where Self: 'a