forked from mirror/async-std
* split stream into multiple files Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com> * cargo fmt Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
32 lines
623 B
Rust
32 lines
623 B
Rust
//! Asynchronous iteration.
|
|
//!
|
|
//! This module is an async version of [`std::iter`].
|
|
//!
|
|
//! [`std::iter`]: https://doc.rust-lang.org/std/iter/index.html
|
|
//!
|
|
//! # Examples
|
|
//!
|
|
//! ```
|
|
//! # fn main() { async_std::task::block_on(async {
|
|
//! #
|
|
//! use async_std::prelude::*;
|
|
//! use async_std::stream;
|
|
//!
|
|
//! let mut s = stream::repeat(9).take(3);
|
|
//!
|
|
//! while let Some(v) = s.next().await {
|
|
//! assert_eq!(v, 9);
|
|
//! }
|
|
//! #
|
|
//! # }) }
|
|
//! ```
|
|
|
|
pub use empty::{empty, Empty};
|
|
pub use once::{once, Once};
|
|
pub use repeat::{repeat, Repeat};
|
|
pub use stream::{Stream, Take};
|
|
|
|
mod empty;
|
|
mod once;
|
|
mod repeat;
|
|
mod stream;
|