Function futures_lite::stream::iter [−][src]
pub fn iter<I: IntoIterator>(iter: I) -> Iter<I::IntoIter>
Creates a stream from an iterator.
Examples
use futures_lite::stream::{self, StreamExt}; let mut s = stream::iter(vec![1, 2]); assert_eq!(s.next().await, Some(1)); assert_eq!(s.next().await, Some(2)); assert_eq!(s.next().await, None);