pub fn contains(&self, addr: &SocketAddr, check_port: bool) -> bool {
    if check_port && Some(addr.port()) != self.port() {
      false
    } else {
      addr.is_ipv6() && self.includes_ipv6() || addr.is_ipv4() && self.includes_ipv4()
    }
  }
/// Checks that a [SocketAddr] is valid in the range of the specified DNS class
Checks that a [SocketAddr] is valid in the range of the specified DNS class
Checks that a [ SocketAddr ] is valid in the range of the specified DNS class
pub fn contains(&self, addr: &SocketAddr, check_port: bool) -> bool {
    if check_port && Some(addr.port()) != self.port() {
      false
    } else {
      addr.is_ipv6() && self.includes_ipv6() || addr.is_ipv4() && self.includes_ipv4()
    }
  }
pub fn contains ( & self , addr : & SocketAddr , check_port : bool ) -> bool { if check_port && Some ( addr . port ( ) ) != self . port ( ) { false } else { addr . is_ipv6 ( ) && self . includes_ipv6 ( ) || addr . is_ipv4 ( ) && self . includes_ipv4 ( ) } }
Checks that a [SocketAddr] is valid in the range of the specified DNS class
Checks that a [ SocketAddr ] is valid in the range of the specified DNS class
&self
addr
&SocketAddr
check_port
bool
&self
addr
&SocketAddr
check_port
bool