pub trait AsSocket {
// Required method
fn as_socket(&self) -> BorrowedSocket<'_>;
}Available on
docsrs and Unix and (crate features fs or net) only.Expand description
Required Methods§
Sourcefn as_socket(&self) -> BorrowedSocket<'_>
fn as_socket(&self) -> BorrowedSocket<'_>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl AsSocket for TcpListener
Available on Windows and crate feature
net only.impl AsSocket for TcpSocket
Available on Windows and crate feature
net only.impl AsSocket for TcpStream
Available on Windows and crate feature
net only.impl AsSocket for UdpSocket
Available on Windows only.