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

#278 in Memory management

Download history 3897/week @ 2023-12-09 3011/week @ 2023-12-16 1652/week @ 2023-12-23 2564/week @ 2023-12-30 2586/week @ 2024-01-06 3504/week @ 2024-01-13 3376/week @ 2024-01-20 2655/week @ 2024-01-27 2350/week @ 2024-02-03 2260/week @ 2024-02-10 2660/week @ 2024-02-17 3191/week @ 2024-02-24 3003/week @ 2024-03-02 3031/week @ 2024-03-09 3443/week @ 2024-03-16 2637/week @ 2024-03-23

12,566 downloads per month
Used in 25 crates (12 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