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§

source

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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl FromRawHandleOrSocket for RawReadable

RawReadable doesn’t own its handle.

source§

impl FromRawHandleOrSocket for RawWriteable

RawWriteable doesn’t own its handle.

source§

impl FromRawHandleOrSocket for OwnedHandleOrSocket