Trait ip::SocketAddrExt
[−]
[src]
pub trait SocketAddrExt { fn new(ip: IpAddr, port: u16) -> SocketAddr; fn ip(&self) -> IpAddr; }
Methods to convert between IpAddr
and std::net::SocketAddr
Required Methods
fn new(ip: IpAddr, port: u16) -> SocketAddr
Creates a new socket address from the (ip, port) pair.
fn ip(&self) -> IpAddr
Returns the IP address associated with this socket address.
Implementors
impl SocketAddrExt for SocketAddr