From a096d5ec2dc7845fb05b09486342fe35dd46bfae Mon Sep 17 00:00:00 2001 From: Felipe Sere Date: Thu, 24 Oct 2019 10:21:42 -0500 Subject: [PATCH] stub out an example --- src/stream/stream/cycle.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/stream/stream/cycle.rs b/src/stream/stream/cycle.rs index 881377f..7ed0774 100644 --- a/src/stream/stream/cycle.rs +++ b/src/stream/stream/cycle.rs @@ -18,3 +18,21 @@ impl Stream for Cycle { Poll::Pending } } + +/// # Examples +/// +/// Basic usage: +/// +/// ``` +/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async { +/// +/// let values = vec![1,2,3]; +/// +/// # Ok(()) }) } +///``` +fn cycle(values: Vec) -> impl Stream { + Cycle { + source: values, + index: 0, + } +}