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

#295 in Memory management

Download history 2954/week @ 2023-11-20 3883/week @ 2023-11-27 3190/week @ 2023-12-04 3935/week @ 2023-12-11 2932/week @ 2023-12-18 1588/week @ 2023-12-25 2622/week @ 2024-01-01 2822/week @ 2024-01-08 3486/week @ 2024-01-15 3165/week @ 2024-01-22 2653/week @ 2024-01-29 2352/week @ 2024-02-05 2332/week @ 2024-02-12 2657/week @ 2024-02-19 3238/week @ 2024-02-26 2949/week @ 2024-03-04

11,238 downloads per month
Used in 22 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