[−][src]Module async_std::stream
Asynchronous iteration.
This module is an async version of std::iter
.
Examples
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); }
Macros
join | unstable Combines multiple streams into a single stream of all their outputs. |
Structs
Empty | A stream that doesn't yield any items. |
Fuse | A |
Join | unstable A stream joining two or more streams. |
Once | A stream that yields a single item. |
Repeat | A stream that yields the same item repeatedly. |
Scan | A stream to maintain state while polling another stream. |
Take | A stream that yields the first |
Zip | An iterator that iterates two other iterators simultaneously. |
Traits
DoubleEndedStream | unstable A stream able to yield elements from both ends. |
FromStream | unstable Conversion from a |
IntoStream | unstable Conversion into a |
Stream | An asynchronous stream of values. |
Functions
empty | Creates a stream that doesn't yield any items. |
once | Creates a stream that yields a single item. |
repeat | Creates a stream that yields the same item repeatedly. |