7 releases (4 breaking)

Uses old Rust 2015

0.4.0 Nov 28, 2020
0.3.0 May 7, 2020
0.2.0 Jul 18, 2019
0.1.0 Oct 5, 2018
0.0.1 Jul 21, 2015

#161 in Memory management

Download history 921/week @ 2021-08-11 1138/week @ 2021-08-18 814/week @ 2021-08-25 596/week @ 2021-09-01 1483/week @ 2021-09-08 1223/week @ 2021-09-15 907/week @ 2021-09-22 997/week @ 2021-09-29 1243/week @ 2021-10-06 590/week @ 2021-10-13 648/week @ 2021-10-20 1542/week @ 2021-10-27 1254/week @ 2021-11-03 1324/week @ 2021-11-10 908/week @ 2021-11-17 1132/week @ 2021-11-24

4,915 downloads per month
Used in less than 8 crates

MIT license

15KB
323 lines

pipe

travis-badge release-badge docs-badge license-badge

A synchronous memory Read/Write pipe.


lib.rs:

Synchronous in-memory pipe

Example

use std::thread::spawn;
use std::io::{Read, Write};

let (mut read, mut write) = pipe::pipe();

let message = "Hello, world!";
spawn(move || write.write_all(message.as_bytes()).unwrap());

let mut s = String::new();
read.read_to_string(&mut s).unwrap();

assert_eq!(&s, message);

Dependencies

~230KB