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

#260 in Memory management

Download history 2299/week @ 2024-07-03 2640/week @ 2024-07-10 2844/week @ 2024-07-17 2307/week @ 2024-07-24 2668/week @ 2024-07-31 2865/week @ 2024-08-07 4211/week @ 2024-08-14 2587/week @ 2024-08-21 3537/week @ 2024-08-28 3828/week @ 2024-09-04 3504/week @ 2024-09-11 2667/week @ 2024-09-18 2857/week @ 2024-09-25 3061/week @ 2024-10-02 2676/week @ 2024-10-09 2664/week @ 2024-10-16

11,780 downloads per month
Used in 52 crates (15 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