Struct tty::FileDesc
[−]
[src]
pub struct FileDesc { /* fields omitted */ }
Wrapper around a raw file descriptor.
Methods
impl FileDesc
[src]
fn new(fd: i32, 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, Error>
Duplicate the inner file descriptor.
Trait Implementations
impl IntoRawFd for FileDesc
[src]
fn into_raw_fd(self) -> i32
Consumes this object, returning the raw underlying file descriptor. Read more