3 ms·
This one? https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html That's actually a very good example. Be
by kps 3y ago
This one? https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html
That's actually a very good example. Because sooner or later, you'll find yourself ten libraries deep with a FE80::1234 that you can't use because nine of the ten thought Ipv6Addr was enough.
- tialaramex 3y agoKinda, yes. std::net::Ipv6Addr re-exports core::net::Ipv6Addr - it lives in core because you don't need an operating system to have network addresses. If you wanted the [u8; 16] that's octets() if you wanted [u16; 8] that's segments() and those are both inline constant functions.