Trait stop_token::stream::StreamExt [−][src]
pub trait StreamExt: Stream {
fn until<T, D>(self, target: T) -> Stop<Self, D>
where
Self: Sized,
T: IntoDeadline<Deadline = D>,
{ ... }
}Expand description
Extend the Stream trait with the until method.
Provided methods
fn until<T, D>(self, target: T) -> Stop<Self, D> where
Self: Sized,
T: IntoDeadline<Deadline = D>,
fn until<T, D>(self, target: T) -> Stop<Self, D> where
Self: Sized,
T: IntoDeadline<Deadline = D>,
Applies the token to the stream, such that the resulting stream
produces no more items once the token becomes cancelled.