[−][src]Struct filedescriptor::Pipe
Represents the readable and writable ends of a pair of descriptors connected via a kernel pipe.
use filedescriptor::Pipe; use std::io::{Read,Write}; use anyhow::Error; 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: FileDescriptor
The readable end of the pipe
write: FileDescriptor
The writable end of the pipe
Implementations
impl Pipe
[src]
Auto Trait Implementations
impl RefUnwindSafe for Pipe
impl Send for Pipe
impl !Sync for Pipe
impl Unpin for Pipe
impl UnwindSafe for Pipe
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,