futures_lite::stream

Function pending

source
pub fn pending<T>() -> Pending<T>
Expand description

Creates a stream that is always pending.

ยงExamples

use futures_lite::stream::{self, StreamExt};

let mut s = stream::pending::<i32>();
s.next().await;
unreachable!();