GAT iterator with for_each function (original) (raw)
December 6, 2021, 4:41pm 1
Hello,
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?
quinedot December 6, 2021, 8:10pm 2
Alternative playground for an alternative error.
I feel this should probably be filed as an issue, but haven't really made headway beyond that.
Imbris December 9, 2021, 5:21am 3
system Closed March 9, 2022, 5:21am 4
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.