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§
Sourcefn as_read_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>
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.
Sourcefn as_write_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>
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.