I'm trying to create a streaming/lending iterator trait with a for_each method but there are issues with lifetimes when the implementer of the trait isn't 'static (e.g. if it contains a reference with a non 'static lifetime).
Is there any way to make this example work and/or some insight into why it isn't possible?
Alternative playground for an alternative error.
I feel this should probably be filed as an issue, but haven't really made headway beyond that.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.