pub trait AsSocket {
// Required method
fn as_socket(&self) -> BorrowedSocket<'_>;
}Available on Windows only.
Expand description
A trait to borrow the socket from an underlying object.
Required Methods§
1.63.0 · Sourcefn as_socket(&self) -> BorrowedSocket<'_>
fn as_socket(&self) -> BorrowedSocket<'_>
Borrows the socket.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl AsSocket for TcpListener
impl AsSocket for TcpStream
impl AsSocket for UdpSocket
impl AsSocket for UnixStream
impl AsSocket for BorrowedSocket<'_>
impl AsSocket for OwnedSocket
impl<T: AsSocket + ?Sized> AsSocket for UniqueRc<T>
impl<T: AsSocket> AsSocket for &T
impl<T: AsSocket> AsSocket for &mut T
impl<T: AsSocket> AsSocket for Box<T>
impl<T: AsSocket> AsSocket for Rc<T>
impl<T: AsSocket> AsSocket for Arc<T>
This impl allows implementing traits that require AsSocket on Arc.