A lot of code uses FromStr to parse IPs in code just because it's more readable to see "2607:f8b0:4009:80b::200e".parse().unwrap() than Ipv6Addr::new(0x2607, 0xf8b0, 0x4009, 0x80b, 0, 0, 0, 0x200e).
Perhaps there could be an ip! macro that would take in a string and parse it into an IP at compile time?
A lot of code uses
FromStrto parse IPs in code just because it's more readable to see"2607:f8b0:4009:80b::200e".parse().unwrap()thanIpv6Addr::new(0x2607, 0xf8b0, 0x4009, 0x80b, 0, 0, 0, 0x200e).Perhaps there could be an
ip!macro that would take in a string and parse it into an IP at compile time?