Skip to main content

LendingIterator

Trait LendingIterator 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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