3 ms·
For example, look at rust's [0]. It claims to vary in size depending on os, but on Linux, at least, it's 20 bytes. [0]: https://doc.rust-lang.org/std/net/enum.
by nynx 6y ago
For example, look at rust's [0]. It claims to vary in size depending on os, but on Linux, at least, it's 20 bytes.
[0]: https://doc.rust-lang.org/std/net/enum.IpAddr.html https://doc.rust-lang.org/std/net/enum.IpAddr.html
- tick_tock_tick 6y agoThis type doesn't appear to support IPv6 Address Zones which was the most complicated part of the post. Actually from my limited googling Rust doesn't seem to support Address Zones at all in it's standard library.
- nynx 6y agoThat's a good point.
- zeeboo 6y agoIt also doesn't include the ipv6 zone scope. Adding that would take it to at least 28 bytes, and still have to handle all the interning problems for cheap equality.
- nonameiguess 6y agoAppears to be 16 bytes on Windows (larger of the two variants): https://github.com/rust-lang/rust/blob/master/library/std/src/sys/windows/c.rs#L598 https://github.com/rust-lang/rust/blob/master/library/std/sr...