@rustlang question about GATs. If it is possible to express the StreamingIterator trait, would it be possible to express the current Iterator trait using the streaming one ? And so not introduce a new trait ?
In my mind it is possible but do I miss something obvious ?
-
Show this thread
-
I was thincking a little more under the shower and it seems that it is in fact not possible. Lifetimes restrictions are specified at the trait declaration not implementation therefore the StreamingIterator will always restrict Item to the lifetime of self.
1 reply 0 retweets 1 likeShow this thread -
When I say lifetime of self I mean the lifetime of the ref to self passed to the next method.
1 reply 0 retweets 1 likeShow this thread
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.