pub struct GeoResult {
pub country: String,
pub region: String,
pub city: String,
pub asn: u32,
pub org: String,
pub longitude: f64,
pub latitude: f64,
}Expand description
GeoIP lookup result containing geographic information for an IP address.
Fields§
§country: StringISO 3166-1 alpha-2 country code (e.g., “CN”, “US”).
region: StringRegion/state/province name (e.g., “Shanghai”, “California”).
city: StringCity name (e.g., “Shanghai”, “Los Angeles”).
asn: u32Autonomous System Number.
org: StringASN organization name (e.g., “China Telecom”).
longitude: f64Longitude coordinate.
latitude: f64Latitude coordinate.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GeoResult
impl<'de> Deserialize<'de> for GeoResult
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 Freeze for GeoResult
impl RefUnwindSafe for GeoResult
impl Send for GeoResult
impl Sync for GeoResult
impl Unpin for GeoResult
impl UnsafeUnpin for GeoResult
impl UnwindSafe for GeoResult
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