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

#347 in Memory management

Download history 2463/week @ 2024-11-17 2220/week @ 2024-11-24 2455/week @ 2024-12-01 2397/week @ 2024-12-08 3252/week @ 2024-12-15 1584/week @ 2024-12-22 2232/week @ 2024-12-29 2888/week @ 2025-01-05 2692/week @ 2025-01-12 2556/week @ 2025-01-19 2833/week @ 2025-01-26 2891/week @ 2025-02-02 3252/week @ 2025-02-09 2551/week @ 2025-02-16 3569/week @ 2025-02-23 2468/week @ 2025-03-02

12,015 downloads per month
Used in 55 crates (16 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