pub struct Country {Show 29 fields
pub iso_code: &'static str,
pub alpha3: &'static str,
pub continent: &'static str,
pub continent_code: &'static str,
pub country_code: &'static str,
pub currency_code: &'static str,
pub distance_unit: &'static str,
pub economic_unions: &'static [&'static str],
pub gec: &'static str,
pub geo: Geo,
pub international_prefix: &'static str,
pub ioc: &'static str,
pub iso_long_name: &'static str,
pub iso_short_name: &'static str,
pub languages_official: &'static [&'static str],
pub languages_spoken: &'static [&'static str],
pub national_destination_code_lengths: &'static [u8],
pub national_number_lengths: &'static [u8],
pub national_prefix: Option<&'static str>,
pub nationality: &'static str,
pub number: &'static str,
pub postal_code: bool,
pub postal_code_format: &'static str,
pub region: &'static str,
pub start_of_week: &'static str,
pub subregion: &'static str,
pub un_locode: &'static str,
pub unofficial_names: &'static [&'static str],
pub world_region: &'static str,
}Expand description
Country information.
Fields§
§iso_code: &'static strThe ISO 3166-1 alpha-2 code of the country.
alpha3: &'static strThe ISO 3166-1 alpha-3 code of the country.
continent: &'static strThe continent the country is located in.
continent_code: &'static strThe continent code.
country_code: &'static strThe country code.
currency_code: &'static strThe currency code used in the country.
distance_unit: &'static strThe distance unit used in the country.
economic_unions: &'static [&'static str]The economic unions the country is part of.
gec: &'static strThe GEC (Geographic Encoding Class) code.
geo: GeoThe geographic information.
international_prefix: &'static strThe international dialing prefix.
ioc: &'static strThe IOC (International Olympic Committee) code.
iso_long_name: &'static strThe long name of the country in ISO format.
iso_short_name: &'static strThe short name of the country in ISO format.
languages_official: &'static [&'static str]The official languages of the country.
languages_spoken: &'static [&'static str]The spoken languages in the country.
national_destination_code_lengths: &'static [u8]The national destination code lengths.
national_number_lengths: &'static [u8]The national number lengths.
national_prefix: Option<&'static str>The national prefix.
nationality: &'static strThe nationality.
number: &'static strThe country number.
postal_code: boolWhether the country has a postal code.
postal_code_format: &'static strThe postal code format.
region: &'static strThe region the country is located in.
start_of_week: &'static strThe start of the week in the country.
subregion: &'static strThe subregion the country is located in.
un_locode: &'static strThe UN/LOCODE of the country.
unofficial_names: &'static [&'static str]The unofficial names of the country.
world_region: &'static strThe world region the country is located in.
Implementations§
Source§impl Country
impl Country
Sourcepub fn is_language_official(&self, language: &str) -> bool
pub fn is_language_official(&self, language: &str) -> bool
Checks if a language is an official language of the country.
Sourcepub fn is_language_spoken(&self, language: &str) -> bool
pub fn is_language_spoken(&self, language: &str) -> bool
Checks if a language is a spoken language of the country.
Sourcepub fn has_language(&self, language: &str) -> bool
pub fn has_language(&self, language: &str) -> bool
Checks if a language is either an official or spoken language of the country.
Sourcepub fn is_unofficial_name(&self, name: &str) -> bool
pub fn is_unofficial_name(&self, name: &str) -> bool
Checks if a name is an unofficial name of the country.
Sourcepub fn has_unofficial_name(&self, name: &str) -> bool
pub fn has_unofficial_name(&self, name: &str) -> bool
Checks if a name is either the short name or an unofficial name of the country.
Sourcepub fn is_region(&self, region: &str) -> bool
pub fn is_region(&self, region: &str) -> bool
Checks if a region is the region the country is located in.
Sourcepub fn is_subregion(&self, subregion: &str) -> bool
pub fn is_subregion(&self, subregion: &str) -> bool
Checks if a subregion is the subregion the country is located in.
Sourcepub fn is_region_or_subregion(&self, region_or_subregion: &str) -> bool
pub fn is_region_or_subregion(&self, region_or_subregion: &str) -> bool
Checks if a region is either the region or subregion the country is located in.
Sourcepub fn is_region_or_subregion_case_insensitive(
&self,
region_or_subregion: &str,
) -> bool
pub fn is_region_or_subregion_case_insensitive( &self, region_or_subregion: &str, ) -> bool
Checks if a region is either the region or subregion the country is located in.
Sourcepub fn is_in_economic_union(&self, economic_union: &str) -> bool
pub fn is_in_economic_union(&self, economic_union: &str) -> bool
Checks if the country is part of a specific economic union.
Sourcepub fn is_in_economic_union_case_insensitive(
&self,
economic_union: &str,
) -> bool
pub fn is_in_economic_union_case_insensitive( &self, economic_union: &str, ) -> bool
Checks if the country is part of a specific economic union.