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

pub trait FromHandleOrSocket {
    fn from_handle_or_socket(handle_or_socket: OwnedHandleOrSocket) -> Self;
}
Expand description

Like FromHandle and FromSocket, 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 FromHandle::from_handle and FromSocket::from_socket but can be passed either type.

Safety

handle_or_socket must be valid and otherwise unowned.

Implementors