Expand description
§Clone streams with clone-stream
Turn any Stream into a cloneable stream where each clone receives all
items independently.
The CloneStream struct implements Clone + Stream, allowing you
to create multiple independent consumers of the same data. The
ForkStream trait provides the entry point for converting regular
streams.
§Quick Start
use clone_stream::ForkStream;
use futures::{StreamExt, stream};
let stream = stream::iter(vec![1, 2, 3]).fork();
let mut clone1 = stream.clone();
let mut clone2 = stream.clone();
// Both clones receive all items independentlyModules§
Structs§
- Clone
Stream - A stream that implements
Cloneand returns cloned items from a base stream. - Fork
Config
Enums§
- Clone
Stream Error - Errors that can occur when working with cloned streams
Traits§
- Fork
Stream - Extension trait to make any
Streamcloneable.