Skip to content

Conversation

@deastoe
Copy link
Contributor

@deastoe deastoe commented Nov 19, 2025

  • address_family: impl From for AddressFamily

When writing AF-agnostic code it's convenient to get the appropriate
AddressFamily variant for a given IpAddr.

Since all platform variations of AddressFamily have Inet and Inet6
variants, we add the impl in a platform-agnostic manner.

  • neighbour: impl From for NeighbourAddress

There are already impls for Ipv4Addr and Ipv6Addr, so for convenience
and commonality with other *Address types add an impl for IpAddr too.

@little-dude little-dude self-requested a review November 24, 2025 16:49
When writing AF-agnostic code it's convenient to get the appropriate
AddressFamily variant for a given IpAddr.

Since all platform variations of AddressFamily have Inet and Inet6
variants, we add the impl in a platform-agnostic manner.

Signed-off-by: Duncan Eastoe <duncan@graphiant.com>
There are already impls for Ipv4Addr and Ipv6Addr, so for convenience
and commonality with other *Address types add an impl for IpAddr too.

Signed-off-by: Duncan Eastoe <duncan@graphiant.com>
@cathay4t cathay4t enabled auto-merge (rebase) November 25, 2025 06:47
@cathay4t cathay4t merged commit a25d26f into rust-netlink:main Nov 25, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants