[−][src]Function smol::stream::repeat
pub fn repeat<T>(item: T) -> Repeat<T> where
T: Clone,
Creates an infinite stream that yields the same item repeatedly.
Examples
use futures_lite::*; let mut s = stream::repeat(7); assert_eq!(s.next().await, Some(7)); assert_eq!(s.next().await, Some(7));