Returns an iterator that iterates over all subnet IPs.
```rust use subnetwork::{Ipv4Pool,Ipv4};
fn main() { let ipv4 = Ipv4::new("192.168.1.1").unwrap(); let ipv4pool = Ipv4Pool::new("192.168.1.0/24").unwrap(); for i in ipv4.iter(24) { println!("{:?}", i); } for i in ipv4pool { println!("{:?}", i); } let ret = ipv4pool.containfromstr("192.168.1.200").unwrap(); asserteq!(ret, true); let ret = ipv4pool.contain(ipv4); asserteq!(ret, true);
let ret = ipv4.within_from_str("192.168.1.0/24").unwarp();
assert_eq!(ret, true);
let ret = ipv4.within(ipv4_pool);
assert_eq!(ret, true);
} ```
You can see how our performance compares to other similar libraries here.