[−][src]Module futures_lite::stream
Combinators for the Stream
trait.
Examples
use futures_lite::*; let mut s = stream::iter(vec![1, 2, 3]); assert_eq!(s.next().await, Some(1)); assert_eq!(s.next().await, Some(2)); assert_eq!(s.next().await, Some(3)); assert_eq!(s.next().await, None);
Re-exports
pub use futures_core::stream::Stream; |
Structs
CollectFuture | Future for the |
Empty | Stream for the |
FoldFuture | Future for the |
Iter | Stream for the |
NextFuture | Future for the |
Once | Stream for the |
Pending | Stream for the |
PollFn | Stream for the |
Repeat | Stream for the |
RepeatWith | Stream for the |
TryCollectFuture | Future for the |
TryFoldFuture | Future for the |
TryUnfold | Stream for the |
Unfold | Stream for the |
Traits
StreamExt | Extension trait for |
Functions
empty | Creates an empty stream. |
iter | Creates a stream from an iterator. |
once | Creates a stream that yields a single item. |
pending | Creates a stream that is always pending. |
poll_fn | Creates a stream from a function returning |
repeat | Creates an infinite stream that yields the same item repeatedly. |
repeat_with | Creates an infinite stream from a closure that generates items. |
try_unfold | Creates a stream from a seed value and a fallible async closure operating on it. |
unfold | Creates a stream from a seed value and an async closure operating on it. |