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.
traits: TraitsVarious traits associated with the IP address.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for City<'a>
impl<'de: 'a, 'a> Deserialize<'de> for City<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for City<'a>
impl<'a> RefUnwindSafe for City<'a>
impl<'a> Send for City<'a>
impl<'a> Sync for City<'a>
impl<'a> Unpin for City<'a>
impl<'a> UnwindSafe for City<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more