IP2C
Get the codes for the representation of names of countries and regions from IP address.
You can directly use rir::IpCodeMap build IP to Codes for the representation of names of countries and regions.
use IpCodeMap;
let mut map = new;
map.load_from_dir.expect;
let code = map.query;
println!;
this library do not provide rir information files, you need download yourself.
see example.txt about download url and official txt format.
Also, you can use IpTree to build IP city location map, eg:
use IpTree;
let mut map = new;
map.ipv4.insert_interval.unwrap;
map.ipv4.insert_interval.unwrap;
map.ipv4.insert_interval.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;