pub struct City<'a> {
pub city: City<'a>,
pub continent: Continent<'a>,
pub country: Country<'a>,
pub location: Location<'a>,
pub postal: Postal<'a>,
pub registered_country: Country<'a>,
pub represented_country: RepresentedCountry<'a>,
pub subdivisions: Vec<Subdivision<'a>>,
pub traits: Traits,
}Expand description
GeoIP2/GeoLite2 City database record.
Contains city-level geolocation data including location coordinates, postal code, subdivisions (states/provinces), and country information. This is the most comprehensive free geolocation record type.
Fields§
§city: City<'a>City data for the IP address.
continent: Continent<'a>Continent data for the IP address.
country: Country<'a>Country where MaxMind believes the IP is located.
location: Location<'a>Location data including coordinates and time zone.
postal: Postal<'a>Postal code data for the IP address.
registered_country: Country<'a>Country where the ISP has registered the IP block.
represented_country: RepresentedCountry<'a>Country represented by users of this IP (e.g., military base or embassy).
subdivisions: Vec<Subdivision<'a>>Subdivisions (states, provinces, etc.) ordered from largest to smallest.
For example, Oxford, UK would have England first, then Oxfordshire.
Deserialization through any Serde format accepts at most
MAX_SUBDIVISIONS entries.
traits: TraitsVarious traits associated with the IP address.