futures_util::stream

Trait 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,

Source§

impl<T> FusedStream for Receiver<T>

Source§

impl<T> FusedStream for UnboundedReceiver<T>

Implementors§

Source§

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

Source§

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

Source§

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>>,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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::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::Error>>,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<St1, St2> FusedStream for Select<St1, St2>
where St1: Stream, St2: Stream<Item = St1::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::Item>, Clos: FnMut(&mut State) -> PollNext,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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::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::Ok) -> Fut, Fut: TryFuture<Error = St::Error>,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<St, Fut, F, T> FusedStream for FilterMap<St, Fut, F>
where St: Stream + FusedStream, F: FnMut1<St::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::Error>, F: FnMut(St::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 FlattenUnordered<Map<St, F>>: FusedStream, St: Stream, U: Stream + Unpin, F: FnMut(St::Item) -> U,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<St: TryStream + FusedStream> FusedStream for futures_util::stream::IntoStream<St>

Source§

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

Source§

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

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)>>,