dup

Crates.iodup
lib.rsdup
version0.1.0
sourcesrc
created_at2017-08-22 04:48:07.928736
updated_at2017-08-22 04:48:07.928736
descriptionA RW pipe for the given 'fd'
homepagehttps://github.com/younisshah/dup
repository
max_upload_size
id28508
size3,718
Younis Shah (younisshah)

documentation

https://github.com/younisshah/dup

README

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

Commit count: 0

cargo fmt