Trait io_extras::os::windows::FromRawHandleOrSocket[][src]

pub trait FromRawHandleOrSocket {
    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

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

RawReadable doesn’t own its handle.

RawWriteable doesn’t own its handle.