Skip to main content

FusedStream

Trait FusedStream 

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§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.

Implementations on Foreign Types§

§

impl<F> FusedStream for &mut F
where F: FusedStream + Unpin + ?Sized,

§

fn is_terminated(&self) -> bool

§

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

§

fn is_terminated(&self) -> bool

§

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

§

fn is_terminated(&self) -> bool

Implementors§