[−][src]Crate pipe
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);
Structs
PipeReader | The |
PipeWriter | The |
Functions
bipipe | feature="bidirectional" Creates a pair of pipes for bidirectional communication, a bit like UNIX's |
pipe | Creates a synchronous memory pipe |