(
&self,
f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R,
)
| 118 | // SAFETY: This just forwards to the inner `SocketAddrArg` implementations. |
| 119 | unsafe impl SocketAddrArg for SocketAddr { |
| 120 | unsafe fn with_sockaddr<R>( |
| 121 | &self, |
| 122 | f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, |
| 123 | ) -> R { |
| 124 | match self { |
| 125 | Self::V4(v4) => v4.with_sockaddr(f), |
| 126 | Self::V6(v6) => v6.with_sockaddr(f), |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | // SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which handles |
no test coverage detected