pub trait AsRawReadWriteFd {
// Required methods
fn as_raw_read_fd(&self) -> RawFd;
fn as_raw_write_fd(&self) -> RawFd;
}Expand description
Like AsRawFd, but for types which may have one or two file descriptors,
for reading and writing.
For types that only have one, both functions return the same value.
Required Methods§
Sourcefn as_raw_read_fd(&self) -> RawFd
fn as_raw_read_fd(&self) -> RawFd
Extracts the raw file descriptor for reading.
Like AsRawFd::as_raw_fd, but returns the reading file descriptor.
Sourcefn as_raw_write_fd(&self) -> RawFd
fn as_raw_write_fd(&self) -> RawFd
Extracts the raw file descriptor for writing.
Like AsRawFd::as_raw_fd, but returns the writing file descriptor.
Implementations on Foreign Types§
Source§impl AsRawReadWriteFd for File
Available on non-Windows only.
impl AsRawReadWriteFd for File
Available on non-Windows only.
fn as_raw_read_fd(&self) -> RawFd
fn as_raw_write_fd(&self) -> RawFd
Source§impl AsRawReadWriteFd for TcpStream
Available on non-Windows only.
impl AsRawReadWriteFd for TcpStream
Available on non-Windows only.
fn as_raw_read_fd(&self) -> RawFd
fn as_raw_write_fd(&self) -> RawFd
Source§impl AsRawReadWriteFd for UnixStream
Available on Unix only.
impl AsRawReadWriteFd for UnixStream
Available on Unix only.
fn as_raw_read_fd(&self) -> RawFd
fn as_raw_write_fd(&self) -> RawFd
Source§impl<T: AsRawReadWriteFd> AsRawReadWriteFd for Box<T>
Available on non-Windows only.
impl<T: AsRawReadWriteFd> AsRawReadWriteFd for Box<T>
Available on non-Windows only.