Lines Matching refs:new_ip
178 pub fn set_ip(&mut self, new_ip: IpAddr) {
179 // `match (*self, new_ip)` would have us mutate a copy of self only to throw it away.
180 match (self, new_ip) {
181 (&mut SocketAddr::V4(ref mut a), IpAddr::V4(new_ip)) => a.set_ip(new_ip),
182 (&mut SocketAddr::V6(ref mut a), IpAddr::V6(new_ip)) => a.set_ip(new_ip),
183 (self_, new_ip) => *self_ = Self::new(new_ip, self_.port()),
334 pub fn set_ip(&mut self, new_ip: Ipv4Addr) {
335 self.ip = new_ip;
439 pub fn set_ip(&mut self, new_ip: Ipv6Addr) {
440 self.ip = new_ip;