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
11,780 downloads per month
Used in 52 crates
(15 directly)
16KB
323 lines
pipe
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