Function someday::new

source ·
pub fn new<T: Clone>(data: T) -> (Reader<T>, Writer<T>)
Expand description

Create a new Reader & Writer pair.

See their documentation for writing and reading functions.

§Example

let (reader, mut writer) = someday::new::<String>("hello world!".into());

assert_eq!(writer.data(), "hello world!");
assert_eq!(writer.data_remote(), "hello world!");