next method in the
Iterator trait can only accept
&mut Self as it's argument, therefore it's impossible to implement
Iterator for those types that implements
Stream can accept
Pin<&mut Self>, but it's primarily designed for asynchronous code. For synchronized code,
Context is redundant.
So, are there plans to add another iterator trait for libstd to accept pinned pointers? Or is there an alternative without side effects?