rust / 1.62.0 / std / os / windows / io / trait.asrawsocket.html /

Trait std::os::windows::io::AsRawSocket

pub trait AsRawSocket {
    fn as_raw_socket(&self) -> RawSocket;
}
Available on Windows only.

Extracts raw sockets.

Required Methods

Extracts the raw socket.

This function is typically used to borrow an owned socket. When used in this way, this method does not pass ownership of the raw socket to the caller, and the socket is only guaranteed to be valid while the original object has not yet been destroyed.

However, borrowing is not strictly required. See AsSocket::as_socket for an API which strictly borrows a socket.

Implementors

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/os/windows/io/trait.AsRawSocket.html