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

#215 in Memory management

Download history 2747/week @ 2022-10-10 3352/week @ 2022-10-17 3632/week @ 2022-10-24 3245/week @ 2022-10-31 3919/week @ 2022-11-07 3463/week @ 2022-11-14 2517/week @ 2022-11-21 3034/week @ 2022-11-28 2413/week @ 2022-12-05 2212/week @ 2022-12-12 1822/week @ 2022-12-19 1343/week @ 2022-12-26 1802/week @ 2023-01-02 2517/week @ 2023-01-09 1795/week @ 2023-01-16 2377/week @ 2023-01-23

8,540 downloads per month
Used in 20 crates (12 directly)

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

~225KB