pub trait StreamExt: Stream { // Provided method fn timeout_at<T>(self, target: T) -> TimeoutAt<Self> where Self: Sized, T: Into<Deadline> { ... } }
Extend the Stream trait with the until method.
Stream
until
Applies the token to the stream, such that the resulting stream produces no more items once the token becomes cancelled.
stream