lending iterator
An iterator-like type whose items borrow from the iterator itself, so only one can be held at a time.
Defined with a GAT (type Item<'a> where Self: 'a; fn next<'a>(&'a mut self)); std has no such trait, so it's driven with while let.
Examples
With a lending
ScanReader,let a = r.next(); let b = r.next();fails with E0499 ifais still used, since each item borrowsrmutably.