Open
Description
I would like to propose the addition of a new abstraction: OptionStream
. I would expect it to have the same Item
as the underlying stream when it's built from an Option::Some
variant, and to always return Poll::Pending
Poll::Ready(None)
(see my comment below) when it's built from Option::None
.
The abstraction is useful when you need to enable/disable a particular stream (i.e. an IntervalStream
) while keeping the same stream type.
Here Here you can find a simple implementation, in case it could make things more clear.