Lines Matching refs:V4

27 /// let localhost_v4 = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
41 V4(#[cfg_attr(staged_api, stable(feature = "ip_addr", since = "1.7.0"))] Ipv4Addr),
232 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)).is_unspecified(), true);
244 IpAddr::V4(ip) => ip.is_unspecified(),
259 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)).is_loopback(), true);
271 IpAddr::V4(ip) => ip.is_loopback(),
288 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(80, 9, 12, 3)).is_global(), true);
300 IpAddr::V4(ip) => ip.is_global(),
315 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(224, 254, 0, 0)).is_multicast(), true);
327 IpAddr::V4(ip) => ip.is_multicast(),
344 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 6)).is_documentation(), true);
359 IpAddr::V4(ip) => ip.is_documentation(),
376 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(198, 19, 255, 255)).is_benchmarking(), true);
384 IpAddr::V4(ip) => ip.is_benchmarking(),
392 /// [`IPv4` address]: IpAddr::V4
399 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 6)).is_ipv4(), true);
410 matches!(self, IpAddr::V4(_))
423 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 6)).is_ipv6(), false);
437 /// Converts this address to an `IpAddr::V4` if it is an IPv4-mapped IPv6 addresses, otherwise it
446 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)).to_canonical().is_loopback(), true);
460 &v4 @ IpAddr::V4(_) => v4,
1010 /// Copies this address to a new `IpAddr::V4`.
1020 /// IpAddr::V4(addr),
1026 IpAddr::V4(ipv4)
1057 IpAddr::V4(v4) => v4 == other,
1068 IpAddr::V4(v4) => self == v4,
1087 IpAddr::V4(v4) => v4.partial_cmp(other),
1098 IpAddr::V4(v4) => self.partial_cmp(v4),
1170 /// Creates an `IpAddr::V4` from a four element byte array.
1178 /// assert_eq!(IpAddr::V4(Ipv4Addr::new(13, 12, 11, 10)), addr);
1182 IpAddr::V4(Ipv4Addr::from(octets))
1793 /// Converts this address to an `IpAddr::V4` if it is an IPv4-mapped addresses, otherwise it
1815 return IpAddr::V4(mapped);
1845 IpAddr::V4(_) => false,
1856 IpAddr::V4(_) => false,
1875 IpAddr::V4(_) => Some(Ordering::Less),
1886 IpAddr::V4(_) => Some(Ordering::Greater),