• Home
  • Raw
  • Download

Lines Matching refs:IpAddr

38 pub enum IpAddr {  enum
221 impl IpAddr { implementation
244 IpAddr::V4(ip) => ip.is_unspecified(), in is_unspecified()
245 IpAddr::V6(ip) => ip.is_unspecified(), in is_unspecified()
271 IpAddr::V4(ip) => ip.is_loopback(), in is_loopback()
272 IpAddr::V6(ip) => ip.is_loopback(), in is_loopback()
300 IpAddr::V4(ip) => ip.is_global(), in is_global()
301 IpAddr::V6(ip) => ip.is_global(), in is_global()
327 IpAddr::V4(ip) => ip.is_multicast(), in is_multicast()
328 IpAddr::V6(ip) => ip.is_multicast(), in is_multicast()
359 IpAddr::V4(ip) => ip.is_documentation(), in is_documentation()
360 IpAddr::V6(ip) => ip.is_documentation(), in is_documentation()
384 IpAddr::V4(ip) => ip.is_benchmarking(), in is_benchmarking()
385 IpAddr::V6(ip) => ip.is_benchmarking(), in is_benchmarking()
410 matches!(self, IpAddr::V4(_)) in is_ipv4()
434 matches!(self, IpAddr::V6(_)) in is_ipv6()
458 pub const fn to_canonical(&self) -> IpAddr { in to_canonical() argument
460 &v4 @ IpAddr::V4(_) => v4, in to_canonical()
461 IpAddr::V6(v6) => v6.to_canonical(), in to_canonical()
1009 impl From<Ipv4Addr> for IpAddr { implementation
1025 fn from(ipv4: Ipv4Addr) -> IpAddr { in from() argument
1026 IpAddr::V4(ipv4) in from()
1031 impl From<Ipv6Addr> for IpAddr { implementation
1047 fn from(ipv6: Ipv6Addr) -> IpAddr { in from() argument
1048 IpAddr::V6(ipv6) in from()
1053 impl PartialEq<Ipv4Addr> for IpAddr { implementation
1057 IpAddr::V4(v4) => v4 == other, in eq()
1058 IpAddr::V6(_) => false, in eq()
1064 impl PartialEq<IpAddr> for Ipv4Addr {
1066 fn eq(&self, other: &IpAddr) -> bool { in eq()
1068 IpAddr::V4(v4) => self == v4, in eq()
1069 IpAddr::V6(_) => false, in eq()
1083 impl PartialOrd<Ipv4Addr> for IpAddr { implementation
1087 IpAddr::V4(v4) => v4.partial_cmp(other), in partial_cmp()
1088 IpAddr::V6(_) => Some(Ordering::Greater), in partial_cmp()
1094 impl PartialOrd<IpAddr> for Ipv4Addr {
1096 fn partial_cmp(&self, other: &IpAddr) -> Option<Ordering> { in partial_cmp()
1098 IpAddr::V4(v4) => self.partial_cmp(v4), in partial_cmp()
1099 IpAddr::V6(_) => Some(Ordering::Less), in partial_cmp()
1169 impl From<[u8; 4]> for IpAddr { implementation
1181 fn from(octets: [u8; 4]) -> IpAddr { in from() argument
1182 IpAddr::V4(Ipv4Addr::from(octets))
1813 pub const fn to_canonical(&self) -> IpAddr { in to_canonical() argument
1815 return IpAddr::V4(mapped); in to_canonical()
1817 IpAddr::V6(*self) in to_canonical()
1841 impl PartialEq<IpAddr> for Ipv6Addr {
1843 fn eq(&self, other: &IpAddr) -> bool { in eq()
1845 IpAddr::V4(_) => false, in eq()
1846 IpAddr::V6(v6) => self == v6, in eq()
1852 impl PartialEq<Ipv6Addr> for IpAddr { implementation
1856 IpAddr::V4(_) => false, in eq()
1857 IpAddr::V6(v6) => v6 == other, in eq()
1871 impl PartialOrd<Ipv6Addr> for IpAddr { implementation
1875 IpAddr::V4(_) => Some(Ordering::Less), in partial_cmp()
1876 IpAddr::V6(v6) => v6.partial_cmp(other), in partial_cmp()
1882 impl PartialOrd<IpAddr> for Ipv6Addr {
1884 fn partial_cmp(&self, other: &IpAddr) -> Option<Ordering> { in partial_cmp()
1886 IpAddr::V4(_) => Some(Ordering::Greater), in partial_cmp()
1887 IpAddr::V6(v6) => self.partial_cmp(v6), in partial_cmp()
2003 impl From<[u8; 16]> for IpAddr { implementation
2026 fn from(octets: [u8; 16]) -> IpAddr { in from() argument
2027 IpAddr::V6(Ipv6Addr::from(octets))
2032 impl From<[u16; 8]> for IpAddr { implementation
2055 fn from(segments: [u16; 8]) -> IpAddr { in from() argument
2056 IpAddr::V6(Ipv6Addr::from(segments))