io_extras::read_write

Trait AsRawReadWriteHandleOrSocket

Source
pub trait AsRawReadWriteHandleOrSocket {
    // Required methods
    fn as_raw_read_handle_or_socket(&self) -> RawHandleOrSocket;
    fn as_raw_write_handle_or_socket(&self) -> RawHandleOrSocket;
}
Expand description

Like AsRawHandleOrSocket, 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_raw_read_handle_or_socket(&self) -> RawHandleOrSocket

Extracts the raw handle or socket for reading.

Like AsRawHandleOrSocket::as_raw_handle_or_socket, but returns the reading handle.

Source

fn as_raw_write_handle_or_socket(&self) -> RawHandleOrSocket

Extracts the raw handle or socket for writing.

Like AsRawHandleOrSocket::as_raw_handle_or_socket, but returns the writing handle.

Implementations on Foreign Types§

Source§

impl AsRawReadWriteHandleOrSocket for File

Source§

impl AsRawReadWriteHandleOrSocket for TcpStream

Source§

impl<T: AsRawReadWriteHandleOrSocket> AsRawReadWriteHandleOrSocket for Box<T>

Implementors§