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

#288 in Memory management

Download history 2698/week @ 2024-01-05 3559/week @ 2024-01-12 3293/week @ 2024-01-19 2875/week @ 2024-01-26 2121/week @ 2024-02-02 2446/week @ 2024-02-09 2604/week @ 2024-02-16 3149/week @ 2024-02-23 3056/week @ 2024-03-01 2953/week @ 2024-03-08 3369/week @ 2024-03-15 3167/week @ 2024-03-22 2277/week @ 2024-03-29 2795/week @ 2024-04-05 2678/week @ 2024-04-12 2485/week @ 2024-04-19

10,714 downloads per month
Used in 31 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