Description
Implement IpV6Address as a ValueObject in the net module.
Spec: valid IPv6
Implementation checklist
Implementation detail
Input / Output
|
Type |
Alias |
| Input |
String |
IpV6AddressInput |
| Output |
String — canonical lowercase with :: compression |
IpV6AddressOutput |
Normalization
Parse with std::net::Ipv6Addr, then re-serialise to its Display form (canonical lowercase with :: compression where applicable).
Validation
Must parse successfully via std::net::Ipv6Addr::from_str.
Extra methods
segments() -> [u16; 8]
is_loopback() -> bool — true for ::1.
References
Description
Implement
IpV6Addressas aValueObjectin thenetmodule.Spec: valid IPv6
Implementation checklist
src/net/ipv6address.rsValueObjecttrait#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]src/net/mod.rsandprelude# ExampleblockROADMAP.mdfrom ⬜ to ✅Implementation detail
Input / Output
StringIpV6AddressInputString— canonical lowercase with::compressionIpV6AddressOutputNormalization
Parse with
std::net::Ipv6Addr, then re-serialise to itsDisplayform (canonical lowercase with::compression where applicable).Validation
Must parse successfully via
std::net::Ipv6Addr::from_str.Extra methods
segments() -> [u16; 8]is_loopback() -> bool—truefor::1.References