2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-04-13 03:46:45 +00:00
async-std/src/stream/mod.rs
2019-08-09 02:56:59 +02:00

25 lines
583 B
Rust

//! Composable asynchronous iteration.
//!
//! This module is an async version of [`std::iter`].
//!
//! [`std::iter`]: https://doc.rust-lang.org/std/iter/index.html
//!
//! # Examples
//!
//! ```
//! # #![feature(async_await)]
//! # fn main() { async_std::task::block_on(async {
//! #
//! use async_std::{prelude::*, stream};
//!
//! let mut stream = stream::repeat(9).take(3);
//!
//! while let Some(num) = stream.next().await {
//! assert_eq!(num, 9);
//! }
//! #
//! # }) }
//! ```
#[doc(inline)]
pub use futures::stream::{empty, once, repeat, Empty, Once, Repeat, Stream};