Trait futures_util::stream::FusedStream [−][src]
pub trait FusedStream: Stream {
fn is_terminated(&self) -> bool;
}
Expand description
A stream which tracks whether or not the underlying stream should no longer be polled.
is_terminated
will return true
if a future should no longer be polled.
Usually, this state occurs after poll_next
(or try_poll_next
) returned
Poll::Ready(None)
. However, is_terminated
may also return true
if a
stream has become inactive and can no longer make progress and should be
ignored or dropped rather than being polled again.
Required methods
fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns true
if the stream should no longer be polled.
Implementations on Foreign Types
Implementors
impl<B, St, S, Fut, F> FusedStream for Scan<St, S, Fut, F> where
St: FusedStream,
F: FnMut(&mut S, St::Item) -> Fut,
Fut: Future<Output = Option<B>>,
impl<F> FusedStream for FlattenStream<F> where
Flatten<F, <F as Future>::Output>: FusedStream,
F: Future,
impl<Fut> FusedStream for TryFlattenStream<Fut> where
TryFlatten<Fut, Fut::Ok>: FusedStream,
Fut: TryFuture,
impl<S, Item> FusedStream for Buffer<S, Item> where
S: Sink<Item> + FusedStream,
This is supported on crate feature
sink
only.impl<S, Item, E> FusedStream for SinkErrInto<S, Item, E> where
S: Sink<Item> + FusedStream,
S::Error: Into<E>,
This is supported on crate feature
sink
only.impl<S, Item, U, St, F> FusedStream for WithFlatMap<S, Item, U, St, F> where
S: FusedStream + Sink<Item>,
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, S::Error>>,
This is supported on crate feature
sink
only.impl<S: FusedStream, F> FusedStream for SinkMapErr<S, F>
This is supported on crate feature
sink
only.