Trait IntoRawSocket
trait IntoRawSocket
A trait to express the ability to consume an object and acquire ownership of
its raw SOCKET.
Required Methods
fn into_raw_socket(self: Self) -> RawSocketConsumes this object, returning the raw underlying socket.
This function is typically used to transfer ownership of the underlying socket to the caller. When used in this way, callers are then the unique owners of the socket and must close it once it's no longer needed.
However, transferring ownership is not strictly required. Use a
Into<OwnedSocket>::intoimplementation for an API which strictly transfers ownership.
Implementors
impl IntoRawSocket for UdpSocketimpl IntoRawSocket for TcpStreamimpl IntoRawSocket for OwnedSocketimpl IntoRawSocket for UnixStreamimpl IntoRawSocket for UnixListenerimpl IntoRawSocket for TcpListener