pub trait ToSocketAddr {
type Err: Error;
// Required method
fn to_socket_addr(&self) -> Result<SocketAddr, Self::Err>;
}Available on non-
wasm_browser only.Expand description
A simpler version of ToSocketAddrs, that does not do any DNS resolution.
Required Associated Types§
Required Methods§
Sourcefn to_socket_addr(&self) -> Result<SocketAddr, Self::Err>
fn to_socket_addr(&self) -> Result<SocketAddr, Self::Err>
Tries to convert this type to a SocketAddr.