Skip to main content

Crate tor_geoip

Crate tor_geoip 

Source
Expand description

A crate for performing GeoIP lookups using the Tor GeoIP database.

Modulesยง

dense_range_map ๐Ÿ”’
Helper type: a frozen RangeMap where most ranges do not have gaps between them.
err ๐Ÿ”’
Error types for GeoIP parsing.

Structsยง

CountryCode
A two-letter country code.
GeoipDb
A database of IP addresses to country codes.
OptionCc
Wrapper for an Option<CountryCode> that encodes None as ??.
RawGeoipDbExport
An export of a GeoIp database in a raw format suitable for embedding.

Enumsยง

Error
An error type from the tor-geoip crate.

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.
HasCountryCode
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.
ParsedLine ๐Ÿ”’
A line as returned by parse_line.