Skip to main content

Crate geoip233

Crate geoip233 

Source
Expand description

§geoip233

Offline GeoIP library for Rust, powered by MaxMind DB (.mmdb) format.

§Feature Flags

FeatureDefaultDescription
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.
GeoIpCity
GeoIP lookup result for a city-level database.
GeoIpCountry
Simplified GeoIP result with only country information.
GeoIpMetadata
Metadata about a loaded GeoIP database.

Enums§

GeoIpError
Errors that can occur when using the GeoIP database.