Lines Matching refs:IpAddr
12 use crate::net::ip::{IpAddr, Ipv4Addr, Ipv6Addr};
136 pub const fn new(ip: IpAddr, port: u16) -> SocketAddr { in new() argument
138 IpAddr::V4(a) => SocketAddr::V4(SocketAddrV4::new(a, port)), in new()
139 IpAddr::V6(a) => SocketAddr::V6(SocketAddrV6::new(a, port, 0, 0)), in new()
159 pub const fn ip(&self) -> IpAddr { in ip() argument
161 SocketAddr::V4(ref a) => IpAddr::V4(*a.ip()), in ip()
162 SocketAddr::V6(ref a) => IpAddr::V6(*a.ip()), in ip()
178 pub fn set_ip(&mut self, new_ip: IpAddr) { in set_ip() argument
181 (&mut SocketAddr::V4(ref mut a), IpAddr::V4(new_ip)) => a.set_ip(new_ip), in set_ip()
182 (&mut SocketAddr::V6(ref mut a), IpAddr::V6(new_ip)) => a.set_ip(new_ip), in set_ip()
588 impl<I: Into<IpAddr>> From<(I, u16)> for SocketAddr {