Function async_std::stream::empty

source ·
pub fn empty<T>() -> Empty<T>
Expand description

Creates a stream that doesn’t yield any items.

This struct is created by the empty function. See its documentation for more.

§Examples

use async_std::prelude::*;
use async_std::stream;

let mut s = stream::empty::<i32>();

assert_eq!(s.next().await, None);