Trait io_extras::os::windows::FromRawHandleOrSocket
source · pub trait FromRawHandleOrSocket {
// Required method
unsafe fn from_raw_handle_or_socket(
raw_handle_or_socket: RawHandleOrSocket
) -> Self;
}
Expand description
Like FromRawHandle
and FromRawSocket
, but implementable by types
which can implement both.
Note: Don’t implement this trait for types which can only implement one or the other, such that it would need to panic if passed the wrong form.
Required Methods§
sourceunsafe fn from_raw_handle_or_socket(
raw_handle_or_socket: RawHandleOrSocket
) -> Self
unsafe fn from_raw_handle_or_socket( raw_handle_or_socket: RawHandleOrSocket ) -> Self
Like FromRawHandle::from_raw_handle
and
FromRawSocket::from_raw_socket
but can be passed either type.
Safety
raw_handle_or_socket
must be valid and otherwise unowned.
Implementors§
impl FromRawHandleOrSocket for RawReadable
RawReadable
doesn’t own its handle.
impl FromRawHandleOrSocket for RawWriteable
RawWriteable
doesn’t own its handle.