nix
nix copied to clipboard
Converts `AddressFamily` to struct with associated consts
Split off from #2199
Script I used to generate the variants: https://gist.github.com/Jan561/067d64641c93017a9bf6b346ac078ec1
Checklist:
- [x] I have read
CONTRIBUTING.md - [x] I have written necessary tests and rustdoc comments
- [x] A change log has been added if this PR modifies nix's API
I'll provide a changelog when rebasing on top of #2211
If you want, I can just add the new variants to the enum for the time being, and postpone the breaking changes
This is pretty intrusive change. Could you please explain the justification in more detail?
It should've been a struct with associated constants from the beginning.
At least theoretically. I won't ever need vendor address families personally, as well as 99.9% of nix users. So yeah, the practical impact of this PR as is would be very low.
That's why I was suggesting to change the PR to only add new variants to the enum (I only need to change one line of my script).
But before hitting 1.0 (in the very distant future), I would definitely reconsider the current enum API.