pub trait AsReadWriteFd {
// Required methods
fn as_read_fd(&self) -> BorrowedFd<'_>;
fn as_write_fd(&self) -> BorrowedFd<'_>;
}Expand description
Like AsFd, 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_read_fd(&self) -> BorrowedFd<'_>
fn as_read_fd(&self) -> BorrowedFd<'_>
Extracts the file descriptor for reading.
Like AsFd::as_fd, but returns the reading file descriptor.
Sourcefn as_write_fd(&self) -> BorrowedFd<'_>
fn as_write_fd(&self) -> BorrowedFd<'_>
Extracts the file descriptor for writing.
Like AsFd::as_fd, but returns the writing file descriptor.
Implementations on Foreign Types§
Source§impl AsReadWriteFd for File
Available on non-Windows only.
impl AsReadWriteFd for File
Available on non-Windows only.
fn as_read_fd(&self) -> BorrowedFd<'_>
fn as_write_fd(&self) -> BorrowedFd<'_>
Source§impl AsReadWriteFd for TcpStream
Available on non-Windows only.
impl AsReadWriteFd for TcpStream
Available on non-Windows only.
fn as_read_fd(&self) -> BorrowedFd<'_>
fn as_write_fd(&self) -> BorrowedFd<'_>
Source§impl AsReadWriteFd for UnixStream
Available on Unix only.
impl AsReadWriteFd for UnixStream
Available on Unix only.
fn as_read_fd(&self) -> BorrowedFd<'_>
fn as_write_fd(&self) -> BorrowedFd<'_>
Source§impl<T: AsReadWriteFd> AsReadWriteFd for Box<T>
Available on non-Windows only.
impl<T: AsReadWriteFd> AsReadWriteFd for Box<T>
Available on non-Windows only.