Lines Matching refs:segments
87 /// They are usually represented as eight 16-bit segments.
144 /// an IPv6 address in text, but in general, each segments is written in hexadecimal
145 /// notation, and segments are separated by `:`. For more information, see
1187 /// Creates a new IPv6 address from eight 16-bit segments.
1249 /// Returns the eight 16-bit segments that make up this address.
1256 /// assert_eq!(Ipv6Addr::new(0, 0, 0, 0, 0, 0xffff, 0xc00a, 0x2ff).segments(),
1266 pub const fn segments(&self) -> [u16; 8] {
1410 || matches!(self.segments(), [0, 0, 0, 0, 0, 0xffff, _, _])
1412 || matches!(self.segments(), [0x64, 0xff9b, 1, _, _, _, _, _])
1414 || matches!(self.segments(), [0x100, 0, 0, 0, _, _, _, _])
1416 || (matches!(self.segments(), [0x2001, b, _, _, _, _, _, _] if b < 0x200)
1423 || matches!(self.segments(), [0x2001, 3, _, _, _, _, _, _])
1425 || matches!(self.segments(), [0x2001, 4, 0x112, _, _, _, _, _])
1427 || matches!(self.segments(), [0x2001, b, _, _, _, _, _, _] if b >= 0x20 && b <= 0x2F)
1458 (self.segments()[0] & 0xfe00) == 0xfc00
1545 (self.segments()[0] & 0xffc0) == 0xfe80
1573 (self.segments()[0] == 0x2001) && (self.segments()[1] == 0xdb8)
1596 (self.segments()[0] == 0x2001) && (self.segments()[1] == 0x2) && (self.segments()[2] == 0)
1670 match self.segments()[0] & 0x000f {
1707 (self.segments()[0] & 0xff00) == 0xff00
1784 if let [0, 0, 0, 0, 0, 0 | 0xffff, ab, cd] = self.segments() {
1896 self.segments().cmp(&other.segments())
1996 fn from(segments: [u16; 8]) -> Ipv6Addr {
1997 let [a, b, c, d, e, f, g, h] = segments;
2055 fn from(segments: [u16; 8]) -> IpAddr {
2056 IpAddr::V6(Ipv6Addr::from(segments))