Trait AsRawSocket

1.0.0 · Source
pub trait AsRawSocket {
    // Required method
    fn as_raw_socket(&self) -> u32;
}
Expand description

Extracts raw sockets.

Required Methods§

1.0.0 · Source

fn as_raw_socket(&self) -> u32

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§

Source§

impl AsRawSocket for feature_extension_for_async_std::net::TcpListener

Source§

impl AsRawSocket for feature_extension_for_async_std::net::TcpStream

Source§

impl AsRawSocket for feature_extension_for_async_std::net::UdpSocket

1.0.0 · Source§

impl AsRawSocket for std::net::tcp::TcpListener

1.0.0 · Source§

impl AsRawSocket for std::net::tcp::TcpStream

1.0.0 · Source§

impl AsRawSocket for std::net::udp::UdpSocket

1.63.0 · Source§

impl AsRawSocket for BorrowedSocket<'_>

1.63.0 · Source§

impl AsRawSocket for OwnedSocket

Source§

impl<T> AsRawSocket for Async<T>
where T: AsRawSocket,