pub trait UnixInputStreamExtManual: Sized {
    // Required methods
    fn fd<T: FromRawFd>(&self) -> T;
    unsafe fn set_close_fd(&self, close_fd: bool);
}

Required Methods§

source

fn fd<T: FromRawFd>(&self) -> T

Return the UNIX file descriptor that the stream reads from.

Returns

The file descriptor of self

source

unsafe fn set_close_fd(&self, close_fd: bool)

Sets whether the fd of this stream will be closed when the stream is closed.

Safety

If you pass in false as the parameter, you may only close the fd if the all references to the stream have been dropped. If you pass in true, you must never call close. Sets whether the file descriptor of self shall be closed when the stream is closed.

close_fd

true to close the file descriptor when done

Implementors§