pub trait SocketAddrExt {
// Required methods
fn new(ip: IpAddr, port: u16) -> SocketAddr;
fn ip(&self) -> IpAddr;
}Expand description
Methods to convert between IpAddr and std::net::SocketAddr
Required Methods§
Sourcefn new(ip: IpAddr, port: u16) -> SocketAddr
fn new(ip: IpAddr, port: u16) -> SocketAddr
Creates a new socket address from the (ip, port) pair.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.