Enum unshare::Fd
[−]
[src]
pub enum Fd { ReadPipe, WritePipe, Inherit, ReadNull, WriteNull, Fd(Closing), RawFd(RawFd), }
An enumeration that is used to configure non-stdio file descriptors. It differs from stdio one because we must differentiate from readable and writable file descriptors for things open by the library
The enumeration members might be non-stable, it's better to use one of the constructors to create an instance
Variants
ReadPipe
WritePipe
Inherit
ReadNull
WriteNull
Fd(Closing)
RawFd(RawFd)
Methods
impl Fd
[src]
fn piped_read() -> Fd
Create a pipe so that child can read from it
fn piped_write() -> Fd
Create a pipe so that child can write to it
fn inherit() -> Fd
Inherit the child descriptor from parent
Not very useful for custom file descriptors better use from_raw_fd()
fn read_null() -> Fd
Create a readable pipe that always has end of file condition
fn write_null() -> Fd
Create a writable pipe that ignores all the input
Trait Implementations
impl FromRawFd for Fd
[src]
unsafe fn from_raw_fd(fd: RawFd) -> Fd
Constructs a new instances of Self
from the given raw file descriptor. Read more