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

#339 in Memory management

Download history 2581/week @ 2024-09-17 2670/week @ 2024-09-24 3284/week @ 2024-10-01 2592/week @ 2024-10-08 2737/week @ 2024-10-15 3420/week @ 2024-10-22 2936/week @ 2024-10-29 2635/week @ 2024-11-05 2808/week @ 2024-11-12 2434/week @ 2024-11-19 2124/week @ 2024-11-26 2640/week @ 2024-12-03 2228/week @ 2024-12-10 3354/week @ 2024-12-17 1404/week @ 2024-12-24 1947/week @ 2024-12-31

9,472 downloads per month
Used in 53 crates (16 directly)

MIT license

16KB
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

~350KB