Releases: rye/rust-netaddr2
Version 0.10.0
Changed
-
Breaking:
Netv4Addr::addr
,Netv4Addr::mask
,Netv6Addr::addr
, andNetv6Addr::mask
all now returnIpv4Addr
orIpv6Addr
respectively instead of&Ipv4Addr
or&Ipv6Addr
. -
Breaking: Replaced the
derive
'dOrd
impl with our own explicit implementation.
If you were using our old ordering, bare in mind that the behavior has changed.Previously, we just used the derived
Ord
comparison on the underlyingIp<...>Addr
structs in field-wise ordering.
Now, aNet<...>Addr
struct is considered greater than another if itsaddr
is equal but its mask is greater, or otherwise if itsaddr
is greater.
For example,1.0.0.0/8
<2.0.0.0/8
,1.0.0.0/7
<1.0.0.0/8
, etc. -
Internal fixes for the tests
-
Adjusted CI configuration
Version 0.9.0
Changed
-
Breaking: Adjusted the signature of the
Contains
trait to take a type parameter.Most users should not be affected in any way by this change, as the
.contains()
method still has the same syntax. However, the types for which containment can be checked are now explicitly enumerated.
Version 0.8.0
Added
is_cidr
method onNetAddr
,Netv4Addr
, andNetv6Addr
to return whether the represented netaddr is CIDR or not.
Changed
- Updated the
serde::de
behavior to be slightly more informative and standard.
Version 0.7.1
Added
- Documented a few undocumented types.
Version 0.7.0
This release changes the structure of the Error
types.
To upgrade, you should:
-
Migrate uses of
netaddr2::netaddr_error::NetAddrError
tonetaddr2::error::Error
(much cleaner!) -
Consider adopting the new
netaddr2::error::Result
type, which, like thestd::io::Error
type, encapsulates your desired type with aResult
whose variant is anetaddr2::error::Error
.
Version 0.6.1
This release fixes an issue in the docs.rs
metadata key.
Version 0.6.0
In this release, we added implementations for the serde::Serialize
and serde::Deserialize
traits, which are gated behind the not-yet-default serde
feature.
Version 0.5.0
In this release, a few impls for the core::fmt::Display
trait are added for the key data structures.
Version 0.4.1
Since version 0.4.0, a large amount of documentation and a few tests were added.
Version 0.4.0
v0.4.0 Version 0.4.0