Expand description
§geoip233
Offline GeoIP library for Rust, powered by MaxMind DB (.mmdb) format.
§Feature Flags
| Feature | Default | Description |
|---|---|---|
mmap | ✓ | Memory-mapped file I/O for databases |
hot-reload | ✗ | Enable update() for runtime database replacement |
§Quick Start
use geoip233::GeoIp;
let geo = GeoIp::open("/path/to/GeoLite2-City.mmdb")?;
let city = geo.lookup_str("8.8.8.8").unwrap();
println!("Country: {}", city.country_str());Structs§
- GeoIp
- A thread-safe GeoIP database reader with optional hot-reload support.
- GeoIp
City - GeoIP lookup result for a city-level database.
- GeoIp
Country - Simplified GeoIP result with only country information.
- GeoIp
Metadata - Metadata about a loaded GeoIP database.
Enums§
- GeoIp
Error - Errors that can occur when using the GeoIP database.