1 unstable release

Uses old Rust 2015

0.1.0 Aug 22, 2017

#4 in #rw

MIT license

4KB

Dup

dup::Dup::new(fd) returns a RW pipe for the given fd.

Install

In your Cargo.toml file add under [dependencies] section

[dependencies]
dup = "0.1.0"

Example

let mut rw = dup::Dup::new(1);

thread::spawn(|| {
    println!("Hello World");
});

let mut reader = BufReader::new(rw.0);
let mut s = String::new();
reader.read_to_string(&mut s);

rw.1.write(s.as_bytes());

License

MIT

Dependencies

~44KB