- ipnet-2.10.0 Rust crate has executable permission on source files. #59
- Add new_assert implementations #57
- Remove redundant curly braces so that the example program can compile #53
- Add ser_as_str feature to serialize using serialize_str() #52
- Add no_std support on nightly #51
- Inline constructors and field getters #48
- Use Serializer::collect_str to serialize output of Display #39
- Fix overflow in mask to prefix conversion #47
- Allow to invoke some functions as const fn #43
- Add IP netmask to prefix conversion functions and new
with_netmask()
constructors.
- Manually implement JsonSchema for IpNet, Ipv4Net, Ipv6Net #41 because default derived JsonSchema does not correspond to Serde representation #40
- Migrate to edition 2018
- Add 'schemars' feature for deriving JSON schema #31
- add convenience IpNet::new method #36
- Merge Fix Error::description() deprecation warning #28.
-
Merge @imp's
Default
implementation. See #18.Ipv4Net
andIpv6Net
now default to 0.0.0.0/0 and ::/0 respectively.IpNet
defaults to the 0/0Ipv4Net
. -
Add
#[allow(arithmetic_overflow)]
forIpv4AddrRange::count()
andIpv6AddrRange::count()
. Since 1.43.0-nightly it gives a build error but this panic behavior is desired. In future it may be replaced with explicit use ofpanic!
. See #21.
- Implement
From<IpAddr>
,From<Ipv4Addr>
, andFrom<Ipv6Addr>
forIpNet
,Ipv4Net
, andIpv6Net
respectively.
-
Implement
FusedIterator
forIpAddrRange
,Ipv4AddrRange
,Ipv6AddrRange
,IpSubnets
,Ipv4Subnets
, andIpv6Subnets
. -
Implement
DoubleEndedIterator
forIpAddrRange
,Ipv4AddrRange
,Ipv6AddrRange
. -
Implement custom
count()
,last()
,max()
,min()
,nth()
, andsize_hint()
forIpAddrRange
,Ipv4AddrRange
,Ipv6AddrRange
.
-
Fix bug where IpAddrRange never ends when start and end are both 0 #11
-
Fix warning about missing 'dyn'
-
The
Emu128
module has been removed. This provided an emulated 128-bit integer for supporting IPv6 addresses. As of Rust 1.26 the built-in 128-bit integers have been marked stable and this library has been updated to use these instead ofEmu128
. -
The
with-serde
feature name shim has been removed. Theserde
feature should now be used using the bareserde
feature name per the Rust API Guidelines. -
The
Deref
onIpv4Net
andIpv6Net
has been removed. This dereferenced to theIpv4Addr
andIpv6Addr
contained in the type. To use these methods call them directly on the contained IP address of interest, which may be accessed using theaddr()
ornetwork()
methods. -
In prior versions it was necessary to use the
Contains
trait to access thecontains()
methods. These are now inherited in public methods on theIpNet
,Ipv4Net
, andIpv6Net
types so are always available. -
The implementations of
IpAdd<u32>
andIpSub<u32>
for IpAddr have been removed. -
The implementations of
IpAdd<u32>
andIpSub<u32>
forIpv6Addr
have been removed.
- Fix to resolve an issue with the optional serde support, where compact binary formats were not properly supported. See issue #10.
- The previous release (1.1.0) introduced serde support using the feature name
with-serde
, but the Rust API Guidelines recommend usingserde
as the name of the feature. This release changes the feature name fromwith-serde
toserde
, but it is backwards compatible for those that already started using thewith-serde
feature name. The 1.1.0 release was yanked on crates.io to discourage further use of this feature name. See pull request #7.
- Adds serde support. See pull request #6.