You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an iterator extension which performs an incremental calculation, yielding partial results along the way (technically a specialisation of scan).
I can easily implement ExactSizeIterator::len, provided the underlying iterator also implements it, but I cannot implement DoubleEndedIterator because that would require computing and caching all intermediate results.
I'm really not sure why rposition is even part of ExactSizeIterator; surely it should be an extension trait that requires both? Currently, it's presence prohibits implementing the len method which is the only part of ExactSize that might reasonably be expected to be there.