@buherator GATs is what you probably want here. There is a small book by the GAT initiative, it is the only place I could find which explains them https://rust-lang.github.io/generic-associated-types-initiative/explainer/iterable.html. Iirc it’s also explained in Rust for Rustaceans which is really good
@turbocooler @buherator see also the first video in the excellent crust of rust series https://www.youtube.com/playlist?list=PLqbS7AVVErFiWDOAVrPt7aYmnuuOLYvOa
Yeah, this is me recommending a video 😱
@buherator Ignoring your question for a second, I filed https://github.com/rust-lang/rust/issues/135589 to add more context to the error and error index entry corresponding to these cases. As the sister comment mentioned, lifetimes on associated items are new(er than The Book) so they are not as well introduced in the documentation.
@buherator pretty happy with how this shaped up
https://github.com/rust-lang/rust/pull/135602