Airport

Struct Airport 

Source
pub struct Airport {
Show 23 fields pub name: String, pub iata_code: Option<String>, pub icao_code: Option<String>, pub lat: f64, pub lng: f64, pub alt: u64, pub city: String, pub city_code: String, pub un_locode: String, pub timezone: String, pub country_code: String, pub names: BTreeMap<String, String>, pub runways: u64, pub departures: u64, pub connections: u64, pub is_major: bool, pub is_international: u64, pub website: String, pub facebook: String, pub twitter: String, pub instagram: String, pub linkedin: String, pub slug: String,
}

Fields§

§name: String

Public name. Available in the Free plan.

§iata_code: Option<String>

Official IATA code. Available in the Free plan.

§icao_code: Option<String>

Official ICAO code. Available in the Free plan.

§lat: f64

Geo Latitude. Available in the Free plan.

§lng: f64

Geo Longitude. Available in the Free plan.

§alt: u64

Airport Runway Elevation (feet)

§city: String

Airport metropolitan city name from Cities DB.

§city_code: String

Airport metropolitan 3 letter city code from Cities DB.

§un_locode: String

United Nations location code.

§timezone: String

Airport location timezone.

§country_code: String

ISO 2 country code from Countries DB. Available in the Free plan.

§names: BTreeMap<String, String>

Alternative names in different languages.

§runways: u64

Total airport runways.

§departures: u64

Total departures from airport per year.

§connections: u64

Total connections with another airports.

§is_major: bool

The major airport in metropolitan area.

§is_international: u64

The airport provides international flights.

§website: String

Airport official website.

§facebook: String

Airport official Facebook page.

§twitter: String

Airport official Twitter account.

§instagram: String

Airport official Instagram profile.

§linkedin: String

Airport official Linkedin profile.

§slug: String

AirLabs generated uniq Airport ID, which you can use for SEO, etc.

Implementations§

Source§

impl Airport

Source

pub fn name(&self) -> &str

Source

pub fn name_by_language(&self, language: impl AsRef<str>) -> Option<&str>

Trait Implementations§

Source§

impl Debug for Airport

Source§

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

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

impl<'de> Deserialize<'de> for Airport

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 Serialize for Airport

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

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> 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, 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>,