Convert a Rust value to a Stream. [WIP].
Add this to your Cargo.toml:
[dependencies]
streamify = "0.1.0"
Convert a Future
to a Stream
:
use streamify;
fn main() {
let fut = async { 10 };
let stream = streamify::from_future(fut);
}
Convert any value to a Stream
:
use streamify;
fn main() {
let val = 10;
let stream = streamify::from_any(val);
let val = "Testing".to_owned();
let stream = streamify::from_any(val);
}