dup 0.1.0

A RW pipe for the given 'fd'
Documentation
  • Coverage
  • 42.86%
    3 out of 7 items documented1 out of 4 items with examples
  • Size
  • Source code size: 3.56 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • younisshah

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