fn cycle(self) -> Cycle<Self>
    where
        Self: Sized + Clone,
    {
        assert_stream::<Self::Item, _>(Cycle::new(self))
    }
/// Repeats a stream endlessly.
///
/// The stream never terminates. Note that you likely want to avoid
/// usage of `collect` or such on the returned stream as it will exhaust
/// available memory as it tries to just fill up all RAM.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::stream::{self, StreamExt};
/// let a = [1, 2, 3];
/// let mut s = stream::iter(a.iter()).cycle();
///
/// 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, Some(&1));
/// assert_eq!(s.next().await, Some(&2));
/// assert_eq!(s.next().await, Some(&3));
/// assert_eq!(s.next().await, Some(&1));
/// # });
/// ```
Repeats a stream endlessly.
The stream never terminates. Note that you likely want to avoid
usage of `collect` or such on the returned stream as it will exhaust
available memory as it tries to just fill up all RAM.
Repeats a stream endlessly . The stream never terminates . Note that you likely want to avoid usage of ` collect ` or such on the returned stream as it will exhaust available memory as it tries to just fill up all RAM .
fn cycle(self) -> Cycle<Self>
    where
        Self: Sized + Clone,
    {
        assert_stream::<Self::Item, _>(Cycle::new(self))
    }
fn cycle ( self ) -> Cycle < Self > where Self : Sized + Clone , { assert_stream :: < Self :: Item , _ > ( Cycle :: new ( self ) ) }
Repeats a stream endlessly.
Repeats a stream endlessly .
self
self
examples
None
futures::executor::block_on(async {
use futures::stream::{self, StreamExt};
let a = [1, 2, 3];
let mut s = stream::iter(a.iter()).cycle().


use futures :: stream :: { self StreamExt } ; let a = [ 1 2 3 ] ; let mut s = stream :: iter ( a . iter () ) . cycle () .
});
None