pub struct NormalizedCityRecord<'a> { /* private fields */ }
Implementations§
Source§impl<'a> NormalizedCityRecord<'a>
impl<'a> NormalizedCityRecord<'a>
Sourcepub fn country_code(&self) -> Option<&str>
pub fn country_code(&self) -> Option<&str>
Returns the country iso code
Sourcepub fn country_name(&self, language: Option<&'a str>) -> Option<String>
pub fn country_name(&self, language: Option<&'a str>) -> Option<String>
Returns the country name
Sourcepub fn registered_country_iso_code(&self) -> Option<&str>
pub fn registered_country_iso_code(&self) -> Option<&str>
Returns the registered country iso code of record NormalizedCityRecord
.
Sourcepub fn registered_country_name(
&self,
language: Option<&'a str>,
) -> Option<String>
pub fn registered_country_name( &self, language: Option<&'a str>, ) -> Option<String>
Returns the registered country name of record NormalizedCityRecord
.
Accepts a language code.
Returns None
if the country is not available.
Sourcepub fn represented_country_iso_code(&self) -> Option<&str>
pub fn represented_country_iso_code(&self) -> Option<&str>
Returns the registered country name of record NormalizedCityRecord
.
Returns None
if the country iso code is not available.
Sourcepub fn represented_country_name(
&self,
language: Option<&'a str>,
) -> Option<String>
pub fn represented_country_name( &self, language: Option<&'a str>, ) -> Option<String>
Returns the registered country name of record NormalizedCityRecord
.
Accepts a language code.
Returns None
if the country is not available.
Sourcepub fn city_name(&self, language: Option<&'a str>) -> Option<String>
pub fn city_name(&self, language: Option<&'a str>) -> Option<String>
Returns the city name of record NormalizedCityRecord
.
Accepts a language code.
Returns None
if the city is not available.
Sourcepub fn city_geoname_id(&self) -> Option<u32>
pub fn city_geoname_id(&self) -> Option<u32>
Returns the city geoname id of record NormalizedCityRecord
.
Returns None
if the city geoname id is not available.
Sourcepub fn subdivision_geoname_id(&self, idx: usize) -> Option<u32>
pub fn subdivision_geoname_id(&self, idx: usize) -> Option<u32>
Returns the subdivision geoname id of record NormalizedCityRecord
.
Accepts index of subdivision.
Returns None
if the subdivision geoname id is not available.
Sourcepub fn subdivision_name(
&self,
idx: usize,
language: Option<&'a str>,
) -> Option<String>
pub fn subdivision_name( &self, idx: usize, language: Option<&'a str>, ) -> Option<String>
Returns the subdivision name of record NormalizedCityRecord
.
Accepts index of subdivision and preferred language.
Returns None
if the subdivision name is not available.
Sourcepub fn subdivision_iso_code(&self, idx: usize) -> Option<&str>
pub fn subdivision_iso_code(&self, idx: usize) -> Option<&str>
Returns the subdivision iso code of record NormalizedCityRecord
.
Accepts index of subdivision.
Returns None
if the subdivision iso code is not available.
Sourcepub fn continent_code(&self) -> Option<&str>
pub fn continent_code(&self) -> Option<&str>
Returns the continent code of record NormalizedCityRecord
.
Returns None
if the continent code is not available.
Sourcepub fn continent_geoname_id(&self) -> Option<u32>
pub fn continent_geoname_id(&self) -> Option<u32>
Returns the continent geoname id of record NormalizedCityRecord
.
Returns None
if the continent geoname id is not available.
Sourcepub fn continent_name(&self, language: Option<&'a str>) -> Option<String>
pub fn continent_name(&self, language: Option<&'a str>) -> Option<String>
Returns the continent name of record NormalizedCityRecord
.
Accepts a language code.
Returns None
if the continent name is not available.
Sourcepub fn postal_code(&self) -> Option<&str>
pub fn postal_code(&self) -> Option<&str>
Returns the postal code of record NormalizedCityRecord
.
Returns None
if the postal code is not available.
Sourcepub fn time_zone(&self) -> Option<&str>
pub fn time_zone(&self) -> Option<&str>
Returns the timezone of record NormalizedCityRecord
.
Returns None
if the timezone is not available.
Sourcepub fn lon_and_lat(&self) -> Option<(f64, f64)>
pub fn lon_and_lat(&self) -> Option<(f64, f64)>
Returns the [Option<(f64, f64)>
] of record NormalizedCityRecord
.
Returns None
if the latitude is not available.