Trait futures_util::stream::FusedStream
source · [−]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
sourceimpl<F> FusedStream for &mut F where
F: FusedStream + Unpin + ?Sized,
impl<F> FusedStream for &mut F where
F: FusedStream + Unpin + ?Sized,
fn is_terminated(&self) -> bool
sourceimpl<P> FusedStream for Pin<P> where
P: DerefMut + Unpin,
<P as Deref>::Target: FusedStream,
impl<P> FusedStream for Pin<P> where
P: DerefMut + Unpin,
<P as Deref>::Target: FusedStream,
fn is_terminated(&self) -> bool
sourceimpl<S> FusedStream for Box<S, Global> where
S: FusedStream + Unpin + ?Sized,
impl<S> FusedStream for Box<S, Global> where
S: FusedStream + Unpin + ?Sized,
fn is_terminated(&self) -> bool
sourceimpl<T> FusedStream for Receiver<T>
impl<T> FusedStream for Receiver<T>
fn is_terminated(&self) -> bool
sourceimpl<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> where
A: FusedStream,
B: FusedStream<Item = A::Item>,
impl<A, F: FnMut() -> A> FusedStream for RepeatWith<F>
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<F> FusedStream for futures_util::future::IntoStream<F> where
Once<F>: FusedStream,
impl<Fut> FusedStream for TryFlattenStream<Fut> where
TryFlatten<Fut, Fut::Ok>: FusedStream,
Fut: TryFuture,
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> where
S: Sink<Item> + FusedStream,
S::Error: Into<E>,
Available 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>>,
Available on crate feature
sink
only.impl<S: FusedStream, F> FusedStream for SinkMapErr<S, F>
Available on crate feature
sink
only.