Struct geoip2_city::Location [−][src]
pub struct Location { pub accuracy_radius: u32, pub latitude: f32, pub longitude: f32, pub metro_code: Option<u32>, pub time_zone: String, }
Expand description
A JSON object containing specific details about the location associated with the IP address.
Fields
accuracy_radius: u32
The approximate accuracy radius, in kilometers, around the latitude and longitude for the geographical entity (country, subdivision, city or postal code) associated with the IP address.
latitude: f32
The approximate WGS84 latitude of the postal code, city, subdivision or country associated with the IP address.
longitude: f32
The approximate WGS84 longitude of the postal code, city, subdivision or country associated with the IP address.
metro_code: Option<u32>
The metro code associated with the IP address. These are only available for IP addresses in the US.
time_zone: String
The time zone associated with location, as specified by the IANA Time Zone Database, e.g., “America/New_York”.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more