Struct filedescriptor::Pipe [−][src]
pub struct Pipe {
    pub read: FileDescriptor,
    pub write: FileDescriptor,
}Expand description
Represents the readable and writable ends of a pair of descriptors connected via a kernel pipe.
use filedescriptor::{Pipe, Error}; use std::io::{Read,Write}; let mut pipe = Pipe::new()?; pipe.write.write(b"hello")?; drop(pipe.write); let mut s = String::new(); pipe.read.read_to_string(&mut s)?; assert_eq!(s, "hello");
Fields
read: FileDescriptorThe readable end of the pipe
write: FileDescriptorThe writable end of the pipe