Expand description
A crate for performing GeoIP lookups using the Tor GeoIP database.
Re-exportsยง
pub(crate) use crate::dense_range_map::DenseRangeMap;๐pub use crate::err::Error;pub(crate) use Debug;๐pub(crate) use Debug;๐pub(crate) use Display;๐pub(crate) use Formatter;๐pub(crate) use IpAddr;๐pub(crate) use Ipv6Addr;๐pub(crate) use NonZeroU16;๐pub(crate) use NonZeroU32;๐pub(crate) use std::ops::RangeInclusive;๐pub(crate) use std::str::FromStr;๐pub(crate) use Arc;๐pub(crate) use OnceLock;๐
Modulesยง
- dense_
range_ ๐map - Helper type: a frozen RangeMap where most ranges do not have gaps between them.
- err ๐
- Error types for GeoIP parsing.
- rpc
- RPC APIs for geoip functionality.
Structsยง
- Country
Code - A two-letter country code.
- GeoipDb
- A database of IP addresses to country codes.
- Option
Cc - Wrapper for an
Option<CountryCode>that encodesNoneas??. - RawGeoip
DbExport - An export of a GeoIp database in a raw format suitable for embedding.
Staticsยง
- EMBEDDED_
DB_ ๐PARSED - A parsed copy of the embedded database.
Traitsยง
- DbAddress ๐
- A type that can be an address entry in one of our databases.
- HasCountry
Code - A (representation of a) host on the network which may have a known country code.
Functionsยง
- parse_
line ๐ - Parse a single line from a database, expecting addresses of type T.
Type Aliasesยง
- Asn ๐
- The type of an ASN.
- Parsed
Line ๐ - A line as returned by
parse_line.