[−][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
PipeBufWriter | The |
PipeReader | The |
PipeWriter | The |
Functions
bipipe | bidirectional Creates a pair of pipes for bidirectional communication, a bit like UNIX's |
bipipe_buffered | bidirectional Creates a pair of pipes for bidirectional communication using buffered writer, a bit like UNIX's |
pipe | Creates a synchronous memory pipe |
pipe_buffered | Creates a synchronous memory pipe with buffered writer |