Struct fd::FileDesc [] [src]

pub struct FileDesc {
    // some fields omitted
}

Wrapper around a raw file descriptor.

Methods

impl FileDesc
[src]

fn new(fd: RawFd, close_on_drop: bool) -> FileDesc

Set close_on_drop to true to close the inner file descriptor when the FileDesc is drop.

fn dup(&self) -> Result<FileDesc>

Duplicate the inner file descriptor.

Trait Implementations

impl Debug for FileDesc
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Drop for FileDesc
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more

impl AsRawFd for FileDesc
[src]

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more

impl IntoRawFd for FileDesc
[src]

fn into_raw_fd(self) -> RawFd

Consumes this object, returning the raw underlying file descriptor. Read more