[][src]Function futures_ext::stream_clone

pub fn stream_clone<T: Clone + Send + 'static, E: Clone + Send + 'static>(
    s: impl Stream<Item = T, Error = E> + Send + 'static,
    copies: usize
) -> Vec<impl Stream<Item = T, Error = E> + Send + 'static>

Given an input Stream, return clones of that stream. This requires both the item and the error to be cloneable. This provides a single element of buffering - all clones must consume each element before the original can make progress.