Trait futures::prelude::stream::FusedStream

source ·
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§

source

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
where F: FusedStream + Unpin + ?Sized,

source§

impl<P> FusedStream for Pin<P>
where P: DerefMut + Unpin, <P as Deref>::Target: FusedStream,

source§

impl<S> FusedStream for Box<S>
where S: FusedStream + Unpin + ?Sized,

Implementors§

source§

impl<A, B> FusedStream for Either<A, B>
where A: FusedStream, B: FusedStream<Item = <A as Stream>::Item>,

source§

impl<A, F> FusedStream for RepeatWith<F>
where F: FnMut() -> A,

source§

impl<B, St, S, Fut, F> FusedStream for Scan<St, S, Fut, F>
where St: FusedStream, F: FnMut(&mut S, <St as Stream>::Item) -> Fut, Fut: Future<Output = Option<B>>,

source§

impl<F> FusedStream for FlattenStream<F>
where Flatten<F, <F as Future>::Output>: FusedStream, F: Future,

source§

impl<F> FusedStream for futures::future::IntoStream<F>
where Once<F>: FusedStream,

source§

impl<Fut> FusedStream for TryFlattenStream<Fut>
where TryFlatten<Fut, <Fut as TryFuture>::Ok>: FusedStream, Fut: TryFuture,

source§

impl<Fut> FusedStream for FuturesOrdered<Fut>
where Fut: Future,

source§

impl<Fut> FusedStream for FuturesUnordered<Fut>
where Fut: Future,

source§

impl<Fut> FusedStream for Once<Fut>
where Fut: Future,

source§

impl<Fut, Si> FusedStream for FlattenSink<Fut, Si>
where TryFlatten<Fut, Si>: FusedStream,

source§

impl<S> FusedStream for Fuse<S>
where S: Stream,

source§

impl<S> FusedStream for PollImmediate<S>
where S: Stream,

source§

impl<S, F> FusedStream for SinkMapErr<S, F>
where S: FusedStream,

source§

impl<S, Item> FusedStream for Buffer<S, Item>
where S: Sink<Item> + FusedStream,

source§

impl<S, Item, E> FusedStream for SinkErrInto<S, Item, E>
where S: Sink<Item> + FusedStream, <S as Sink<Item>>::Error: Into<E>,

source§

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 as Sink<Item>>::Error>>,

source§

impl<St1, St2> FusedStream for Chain<St1, St2>
where St1: Stream, St2: FusedStream<Item = <St1 as Stream>::Item>,

source§

impl<St1, St2> FusedStream for Select<St1, St2>
where St1: Stream, St2: Stream<Item = <St1 as Stream>::Item>,

source§

impl<St1, St2> FusedStream for Zip<St1, St2>
where St1: Stream, St2: Stream,

source§

impl<St1, St2, Clos, State> FusedStream for SelectWithStrategy<St1, St2, Clos, State>
where St1: Stream, St2: Stream<Item = <St1 as Stream>::Item>, Clos: FnMut(&mut State) -> PollNext,

source§

impl<St> FusedStream for BufferUnordered<St>
where St: Stream, <St as Stream>::Item: Future,

source§

impl<St> FusedStream for Buffered<St>
where St: Stream, <St as Stream>::Item: Future,

source§

impl<St> FusedStream for CatchUnwind<St>
where St: FusedStream + UnwindSafe,

source§

impl<St> FusedStream for Chunks<St>
where St: FusedStream,

source§

impl<St> FusedStream for Cycle<St>
where St: Clone + Stream,

source§

impl<St> FusedStream for Enumerate<St>
where St: Stream + FusedStream,

source§

impl<St> FusedStream for Flatten<St>
where Flatten<St, <St as Stream>::Item>: FusedStream, St: Stream,

source§

impl<St> FusedStream for futures::stream::IntoStream<St>
where St: TryStream + FusedStream,

source§

impl<St> FusedStream for Peekable<St>
where St: Stream,

source§

impl<St> FusedStream for ReadyChunks<St>
where St: Stream,

source§

impl<St> FusedStream for SelectAll<St>
where St: Stream + Unpin,

source§

impl<St> FusedStream for Skip<St>
where St: FusedStream,

source§

impl<St> FusedStream for Take<St>
where St: FusedStream,

source§

impl<St> FusedStream for TryChunks<St>
where St: TryStream + FusedStream,

source§

impl<St> FusedStream for TryFlatten<St>
where St: TryStream + FusedStream, <St as TryStream>::Ok: TryStream, <<St as TryStream>::Ok as TryStream>::Error: From<<St as TryStream>::Error>,

source§

impl<St> FusedStream for TryFlattenUnordered<St>
where FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: FusedStream, St: TryStream, <St as TryStream>::Ok: TryStream + Unpin, <<St as TryStream>::Ok as TryStream>::Error: From<<St as TryStream>::Error>,

source§

impl<St> FusedStream for TryReadyChunks<St>
where St: TryStream + FusedStream,

source§

impl<St, E> FusedStream for ErrInto<St, E>
where MapErr<St, IntoFn<E>>: FusedStream,

source§

impl<St, F> FusedStream for Inspect<St, F>
where Map<St, InspectFn<F>>: FusedStream,

source§

impl<St, F> FusedStream for InspectErr<St, F>
where Inspect<IntoStream<St>, InspectErrFn<F>>: FusedStream,

source§

impl<St, F> FusedStream for InspectOk<St, F>
where Inspect<IntoStream<St>, InspectOkFn<F>>: FusedStream,

source§

impl<St, F> FusedStream for Map<St, F>
where St: FusedStream, F: FnMut1<<St as Stream>::Item>,

source§

impl<St, F> FusedStream for MapErr<St, F>
where Map<IntoStream<St>, MapErrFn<F>>: FusedStream,

source§

impl<St, F> FusedStream for MapOk<St, F>
where Map<IntoStream<St>, MapOkFn<F>>: FusedStream,

source§

impl<St, Fut> FusedStream for TakeUntil<St, Fut>
where St: Stream, Fut: Future,

source§

impl<St, Fut, F> FusedStream for AndThen<St, Fut, F>
where St: TryStream + FusedStream, F: FnMut(<St as TryStream>::Ok) -> Fut, Fut: TryFuture<Error = <St as TryStream>::Error>,

source§

impl<St, Fut, F> FusedStream for Filter<St, Fut, F>
where St: Stream + FusedStream, F: FnMut(&<St as Stream>::Item) -> Fut, Fut: Future<Output = bool>,

source§

impl<St, Fut, F> FusedStream for OrElse<St, Fut, F>
where St: TryStream + FusedStream, F: FnMut(<St as TryStream>::Error) -> Fut, Fut: TryFuture<Ok = <St as TryStream>::Ok>,

source§

impl<St, Fut, F> FusedStream for SkipWhile<St, Fut, F>
where St: FusedStream, F: FnMut(&<St as Stream>::Item) -> Fut, Fut: Future<Output = bool>,

source§

impl<St, Fut, F> FusedStream for TakeWhile<St, Fut, F>
where St: FusedStream, F: FnMut(&<St as Stream>::Item) -> Fut, Fut: Future<Output = bool>,

source§

impl<St, Fut, F> FusedStream for Then<St, Fut, F>
where St: FusedStream, F: FnMut(<St as Stream>::Item) -> Fut, Fut: Future,

source§

impl<St, Fut, F> FusedStream for TryFilter<St, Fut, F>
where St: TryStream + FusedStream, F: FnMut(&<St as TryStream>::Ok) -> Fut, Fut: Future<Output = bool>,

source§

impl<St, Fut, F> FusedStream for TrySkipWhile<St, Fut, F>
where St: TryStream + FusedStream, F: FnMut(&<St as TryStream>::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = <St as TryStream>::Error>,

source§

impl<St, Fut, F> FusedStream for TryTakeWhile<St, Fut, F>
where St: TryStream + FusedStream, F: FnMut(&<St as TryStream>::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = <St as TryStream>::Error>,

source§

impl<St, Fut, F, T> FusedStream for FilterMap<St, Fut, F>
where St: Stream + FusedStream, F: FnMut1<<St as Stream>::Item, Output = Fut>, Fut: Future<Output = Option<T>>,

source§

impl<St, Fut, F, T> FusedStream for TryFilterMap<St, Fut, F>
where St: TryStream + FusedStream, Fut: TryFuture<Ok = Option<T>, Error = <St as TryStream>::Error>, F: FnMut(<St as TryStream>::Ok) -> Fut,

source§

impl<St, U, F> FusedStream for FlatMap<St, U, F>
where Flatten<Map<St, F>, U>: FusedStream,

source§

impl<St, U, F> FusedStream for FlatMapUnordered<St, U, F>
where FlattenUnorderedWithFlowController<Map<St, F>, ()>: FusedStream, St: Stream, U: Stream + Unpin, F: FnMut(<St as Stream>::Item) -> U,

source§

impl<T> FusedStream for Receiver<T>

source§

impl<T> FusedStream for UnboundedReceiver<T>

source§

impl<T> FusedStream for Empty<T>

source§

impl<T> FusedStream for Pending<T>

source§

impl<T> FusedStream for Repeat<T>
where T: Clone,

source§

impl<T, F, Fut, Item> FusedStream for Unfold<T, F, Fut>
where F: FnMut(T) -> Fut, Fut: Future<Output = Option<(Item, T)>>,