pub trait AsReadWriteHandleOrSocket {
    // Required methods
    fn as_read_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>;
    fn as_write_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>;
}
Expand description

Like AsHandleOrSocket, but for types which may have one or two handles or sockets, for reading and writing.

For types that only have one, both functions return the same value.

Required Methods§

source

fn as_read_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>

Extracts the handle or socket for reading.

Like AsHandleOrSocket::as_handle_or_socket, but returns the reading handle.

source

fn as_write_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>

Extracts the handle or socket for writing.

Like AsHandleOrSocket::as_handle_or_socket, but returns the writing handle.

Implementations on Foreign Types§

source§

impl AsReadWriteHandleOrSocket for File

source§

impl<T: AsReadWriteHandleOrSocket> AsReadWriteHandleOrSocket for Box<T>

source§

impl AsReadWriteHandleOrSocket for TcpStream

Implementors§