IntoRawSocket in std::os::windows::io - Rust (original) (raw)

Trait IntoRawSocket

1.0.0 · Source

pub trait IntoRawSocket {
    // Required method
    fn into_raw_socket(self) -> RawSocket;
}

Available on Windows only.

Expand description

A trait to express the ability to consume an object and acquire ownership of its raw SOCKET.

1.4.0 · Source

Consumes 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 aInto<OwnedSocket>::into implementation for an API which strictly transfers ownership.

1.4.0 · Source§

1.4.0 · Source§

1.4.0 · Source§

1.63.0 · Source§