pub trait FusedStream: Stream {
// Required method
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§
Sourcefn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns true
if the stream should no longer be polled.
Implementations on Foreign Types§
Source§impl<F> FusedStream for &mut F
impl<F> FusedStream for &mut F
fn is_terminated(&self) -> bool
Source§impl<P> FusedStream for Pin<P>
impl<P> FusedStream for Pin<P>
fn is_terminated(&self) -> bool
Source§impl<S> FusedStream for Box<S>
impl<S> FusedStream for Box<S>
fn is_terminated(&self) -> bool
Source§impl<T> FusedStream for Receiver<T>
impl<T> FusedStream for Receiver<T>
fn is_terminated(&self) -> bool
Source§impl<T> FusedStream for UnboundedReceiver<T>
impl<T> FusedStream for UnboundedReceiver<T>
fn is_terminated(&self) -> bool
Implementors§
impl<A, B> FusedStream for Either<A, B>
impl<A, F: FnMut() -> A> FusedStream for RepeatWith<F>
impl<B, St, S, Fut, F> FusedStream for Scan<St, S, Fut, F>
impl<F> FusedStream for FlattenStream<F>
impl<F> FusedStream for futures_util::future::IntoStream<F>where
Once<F>: FusedStream,
impl<Fut> FusedStream for TryFlattenStream<Fut>
impl<Fut, Si> FusedStream for FlattenSink<Fut, Si>where
TryFlatten<Fut, Si>: FusedStream,
impl<Fut: Future> FusedStream for FuturesOrdered<Fut>
impl<Fut: Future> FusedStream for FuturesUnordered<Fut>
impl<Fut: Future> FusedStream for Once<Fut>
impl<S, Item> FusedStream for Buffer<S, Item>where
S: Sink<Item> + FusedStream,
Available on crate feature
sink
only.impl<S, Item, E> FusedStream for SinkErrInto<S, Item, E>
Available on crate feature
sink
only.impl<S, Item, U, St, F> FusedStream for WithFlatMap<S, Item, U, St, F>
Available on crate feature
sink
only.impl<S: FusedStream, F> FusedStream for SinkMapErr<S, F>
Available on crate feature
sink
only.