Trait polkadot_node_subsystem::gen::futures::prelude::stream::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
fn is_terminated(&self) -> bool
Returns true
if the stream should no longer be polled.
Implementations on Foreign Types§
source§impl FusedStream for DelayedApprovalTimer
impl FusedStream for DelayedApprovalTimer
fn is_terminated(&self) -> bool
source§impl<Ch, R> FusedStream for Receiver<Ch, R>where
R: Unsubscribe,
impl<Ch, R> FusedStream for Receiver<Ch, R>where
R: Unsubscribe,
fn is_terminated(&self) -> bool
§impl<F> FusedStream for &mut F
impl<F> FusedStream for &mut F
fn is_terminated(&self) -> bool
§impl<O> FusedStream for Boxed<O>
impl<O> FusedStream for Boxed<O>
fn is_terminated(&self) -> bool
source§impl<Payload> FusedStream for NotificationReceiver<Payload>
impl<Payload> FusedStream for NotificationReceiver<Payload>
fn is_terminated(&self) -> bool
§impl<S> FusedStream for Box<S>
impl<S> FusedStream for Box<S>
fn is_terminated(&self) -> bool
source§impl<T> FusedStream for TracingUnboundedReceiver<T>
impl<T> FusedStream for TracingUnboundedReceiver<T>
fn is_terminated(&self) -> bool
§impl<T> FusedStream for Receiver<T>
impl<T> FusedStream for Receiver<T>
fn is_terminated(&self) -> bool
§impl<T> FusedStream for WebSocketStream<T>where
T: AsyncRead + AsyncWrite + Unpin,
impl<T> FusedStream for WebSocketStream<T>where
T: AsyncRead + AsyncWrite + Unpin,
fn is_terminated(&self) -> bool
§impl<TBehaviour> FusedStream for Swarm<TBehaviour>where
TBehaviour: NetworkBehaviour,
impl<TBehaviour> FusedStream for Swarm<TBehaviour>where
TBehaviour: NetworkBehaviour,
The stream of swarm events never terminates, so we can implement fused for it.