Location

Struct Location 

Source
#[non_exhaustive]
pub struct Location {
Show 18 fields pub aerial_height: Option<String>, pub city: Option<String>, pub continent: Option<String>, pub coordinates: Option<Vec<f64>>, pub country: Option<String>, pub desc: Option<String>, pub geodetic_altitude: Option<String>, pub geodetic_vertical_accuracy: Option<String>, pub geohash: Option<String>, pub horizontal_accuracy: Option<String>, pub is_on_premises: Option<bool>, pub isp: Option<String>, pub lat: Option<f64>, pub long: Option<f64>, pub postal_code: Option<String>, pub pressure_altitude: Option<String>, pub provider: Option<String>, pub region: Option<String>,
}
Expand description

Geo Location

The Geo Location object describes a geographical location, usually associated with an IP address.

[] Category: | Name: location

Constraints:

  • at_least_one: [city,country,postal_code,region]

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§aerial_height: Option<String>

Aerial Height

Expressed as either height above takeoff location or height above ground level (AGL) for a UAS current location. This value is provided in meters and must have a minimum resolution of 1 m. Special Values: Invalid, No Value, or Unknown: -1000 m.

optional

§city: Option<String>

City

The name of the city.

recommended

§continent: Option<String>

Continent

The name of the continent.

recommended

§coordinates: Option<Vec<f64>>

Coordinates

A two-element array, containing a longitude/latitude pair. The format conforms with GeoJSON. For example: [-73.983, 40.719].

optional

§country: Option<String>

Country

The ISO 3166-1 Alpha-2 country code.

Note: The two letter country code should be capitalized. For example: US or CA.

recommended

§desc: Option<String>

Description

The description of the geographical location.

optional

§geodetic_altitude: Option<String>

Geodetic Altitude

The aircraft distance above or below the ellipsoid as measured along a line that passes through the aircraft and is normal to the surface of the WGS-84 ellipsoid. This value is provided in meters and must have a minimum resolution of 1 m. Special Values: Invalid, No Value, or Unknown: -1000 m.

optional

§geodetic_vertical_accuracy: Option<String>

Geodetic Vertical Accuracy

Provides quality/containment on geodetic altitude. This is based on ADS-B Geodetic Vertical Accuracy (GVA). Measured in meters.

optional

§geohash: Option<String>

Geohash

Geohash of the geo-coordinates (latitude and longitude).

Geohashing is a geocoding system used to encode geographic coordinates in decimal degrees, to a single string.

optional

§horizontal_accuracy: Option<String>

Horizontal Accuracy

Provides quality/containment on horizontal position. This is based on ADS-B NACp. Measured in meters.

optional

§is_on_premises: Option<bool>

On Premises

The indication of whether the location is on premises.

optional

§isp: Option<String>

ISP Name

The name of the Internet Service Provider (ISP).

optional

§lat: Option<f64>

Latitude

The geographical Latitude coordinate represented in Decimal Degrees (DD). For example: 42.361145.

optional

§long: Option<f64>

Longitude

The geographical Longitude coordinate represented in Decimal Degrees (DD). For example: -71.057083.

optional

§postal_code: Option<String>

Postal Code

The postal code of the location.

optional

§pressure_altitude: Option<String>

Pressure Altitude

The uncorrected barometric pressure altitude (based on reference standard 29.92 inHg, 1013.25 mb) provides a reference for algorithms that utilize ‘altitude deltas’ between aircraft. This value is provided in meters and must have a minimum resolution of 1 m.. Special Values: Invalid, No Value, or Unknown: -1000 m.

optional

§provider: Option<String>

Provider

The provider of the geographical location data.

optional

§region: Option<String>

Region

The alphanumeric code that identifies the principal subdivision (e.g. province or state) of the country. For example, ‘CH-VD’ for the Canton of Vaud, Switzerland

optional

Trait Implementations§

Source§

impl Clone for Location

Source§

fn clone(&self) -> Location

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Location

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Location

Source§

fn default() -> Location

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Location

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Location

Source§

fn eq(&self, other: &Location) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Location

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Location

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,