pub trait LendingIterator {
type Item<'a>
where Self: 'a;
// Required methods
fn next(&mut self) -> Option<Self::Item<'_>>;
fn count(self) -> usize;
}Expand description
The LendingIterator is a version of an Iterator that can yield items with references into the lender. It is a well-known name and there are multiple crates which offer it, with differences. The needs here are small, and so rather than bring in a pre-1.0 crate, just make our own.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.