The types Ipv4NetworkIterator and Ipv6NetworkIterator are not public types in the library. But you can get them from the iter methods on the network types. They should probably be exported?
Also, these hidden iterator types implement Copy. Iterators should usually not implement Copy. Because using them becomes very confusing. Every time you pass the iterator somewhere by value it's copied and the original instance stays where it was and can still be iterated. Meaning you can use a single iterator to iterate over the "collection" many times.
The types
Ipv4NetworkIterator
andIpv6NetworkIterator
are not public types in the library. But you can get them from theiter
methods on the network types. They should probably be exported?Also, these hidden iterator types implement
Copy
. Iterators should usually not implementCopy
. Because using them becomes very confusing. Every time you pass the iterator somewhere by value it's copied and the original instance stays where it was and can still be iterated. Meaning you can use a single iterator to iterate over the "collection" many times.