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Sxm
Svk
Svn
Slb
Som
Zaf
Sgs
Ssd
Esp
Lka
Sdn
Sur
Sjm
Swe
Che
Syr
Twn
Tjk
Tza
Tha
Tls
Tgo
Tkl
Ton
Tto
Tun
Tur
Tkm
Tca
Tuv
Uga
Ukr
Are
Gbr
Umi
Usa
Ury
Uzb
Vut
Ven
Vnm
Vgb
Vir
Wlf
Esh
Yem
Zmb
Zwe
}
Constructors
-
Afg -
Ala -
Alb -
Dza -
Asm -
And -
Ago -
Aia -
Ata -
Atg -
Arg -
Arm -
Abw -
Aus -
Aut -
Aze -
Bhs -
Bhr -
Bgd -
Brb -
Blr -
Bel -
Blz -
Ben -
Bmu -
Btn -
Bol -
Bes -
Bih -
Bwa -
Bvt -
Bra -
Iot -
Brn -
Bgr -
Bfa -
Bdi -
Cpv -
Khm -
Cmr -
Can -
Cym -
Caf -
Tcd -
Chl -
Chn -
Cxr -
Cck -
Col -
Com -
Cog -
Cod -
Cok -
Cri -
Civ -
Hrv -
Cub -
Cuw -
Cyp -
Cze -
Dnk -
Dji -
Dma -
Dom -
Ecu -
Egy -
Slv -
Gnq -
Eri -
Est -
Swz -
Eth -
Flk -
Fro -
Fji -
Fin -
Fra -
Guf -
Pyf -
Atf -
Gab -
Gmb -
Geo -
Deu -
Gha -
Gib -
Grc -
Grl -
Grd -
Glp -
Gum -
Gtm -
Ggy -
Gin -
Gnb -
Guy -
Hti -
Hmd -
Vat -
Hnd -
Hkg -
Hun -
Isl -
Ind -
Idn -
Irn -
Irq -
Irl -
Imn -
Isr -
Ita -
Jam -
Jpn -
Jey -
Jor -
Kaz -
Ken -
Kir -
Prk -
Kor -
Kwt -
Kgz -
Lao -
Lva -
Lbn -
Lso -
Lbr -
Lby -
Lie -
Ltu -
Lux -
Mac -
Mdg -
Mwi -
Mys -
Mdv -
Mli -
Mlt -
Mhl -
Mtq -
Mrt -
Mus -
Myt -
Mex -
Fsm -
Mda -
Mco -
Mng -
Mne -
Msr -
Mar -
Moz -
Mmr -
Nam -
Nru -
Npl -
Nld -
Ncl -
Nzl -
Nic -
Ner -
Nga -
Niu -
Nfk -
Mkd -
Mnp -
Nor -
Omn -
Pak -
Plw -
Pse -
Pan -
Png -
Pry -
Per -
Phl -
Pcn -
Pol -
Prt -
Pri -
Qat -
Reu -
Rou -
Rus -
Rwa -
Blm -
Shn -
Kna -
Lca -
Maf -
Spm -
Vct -
Wsm -
Smr -
Stp -
Sau -
Sen -
Srb -
Syc -
Sle -
Sgp -
Sxm -
Svk -
Svn -
Slb -
Som -
Zaf -
Sgs -
Ssd -
Esp -
Lka -
Sdn -
Sur -
Sjm -
Swe -
Che -
Syr -
Twn -
Tjk -
Tza -
Tha -
Tls -
Tgo -
Tkl -
Ton -
Tto -
Tun -
Tur -
Tkm -
Tca -
Tuv -
Uga -
Ukr -
Are -
Gbr -
Umi -
Usa -
Ury -
Uzb -
Vut -
Ven -
Vnm -
Vgb -
Vir -
Wlf -
Esh -
Yem -
Zmb -
Zwe
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub type Country {
Afghanistan
AlandIslands
Albania
Algeria
AmericanSamoa
Andorra
Angola
Anguilla
Antarctica
AntiguaAndBarbuda
Argentina
Armenia
Aruba
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
BonaireSintEustatiusAndSaba
BosniaAndHerzegovina
Botswana
BouvetIsland
Brazil
BritishIndianOceanTerritory
BruneiDarussalam
Bulgaria
BurkinaFaso
Burundi
CaboVerde
Cambodia
Cameroon
Canada
CaymanIslands
CentralAfricanRepublic
Chad
Chile
China
ChristmasIsland
CocosIslands
Colombia
Comoros
Congo
CongoDemocraticRepublic
CookIslands
CostaRica
CoteDIvoire
Croatia
Cuba
Curacao
Cyprus
Czechia
Denmark
Djibouti
Dominica
DominicanRepublic
Ecuador
Egypt
ElSalvador
EquatorialGuinea
Eritrea
Estonia
Eswatini
Ethiopia
FalklandIslands
FaroeIslands
Fiji
Finland
France
FrenchGuiana
FrenchPolynesia
FrenchSouthernTerritories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
GuineaBissau
Guyana
Haiti
HeardIslandAndMcDonaldIslands
HolySee
Honduras
HongKong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
IsleOfMan
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
KoreaDemocraticPeoplesRepublic
KoreaRepublic
Kuwait
Kyrgyzstan
LaoPeoplesDemocraticRepublic
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macao
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
MarshallIslands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
NewCaledonia
NewZealand
Nicaragua
Niger
Nigeria
Niue
NorfolkIsland
NorthMacedonia
NorthernMarianaIslands
Norway
Oman
Pakistan
Palau
Palestine
Panama
PapuaNewGuinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
PuertoRico
Qatar
Reunion
Romania
RussianFederation
Rwanda
SaintBarthelemy
SaintHelenaAscensionTristanDaCunha
SaintKittsAndNevis
SaintLucia
SaintMartinFrenchPart
SaintPierreAndMiquelon
SaintVincentAndTheGrenadines
Samoa
SanMarino
SaoTomeAndPrincipe
SaudiArabia
Senegal
Serbia
Seychelles
SierraLeone
Singapore
SintMaartenDutchPart
Slovakia
Slovenia
SolomonIslands
Somalia
SouthAfrica
SouthGeorgiaSouthSandwichIslands
SouthSudan
Spain
SriLanka
Sudan
Suriname
SvalbardJanMayen
Sweden
Switzerland
SyrianArabRepublic
TaiwanProvinceOfChina
Tajikistan
Tanzania
Thailand
TimorLeste
Togo
Tokelau
Tonga
TrinidadAndTobago
Tunisia
Turkey
Turkmenistan
TurksAndCaicosIslands
Tuvalu
Uganda
Ukraine
UnitedArabEmirates
UnitedKingdom
UnitedStatesOfAmerica
UnitedStatesOutlyingIslands
Uruguay
Uzbekistan
Vanuatu
Venezuela
VietNam
VirginIslandsBritish
VirginIslandsUS
WallisAndFutuna
WesternSahara
Yemen
Zambia
Zimbabwe
}
Constructors
-
Afghanistan -
AlandIslands -
Albania -
Algeria -
AmericanSamoa -
Andorra -
Angola -
Anguilla -
Antarctica -
AntiguaAndBarbuda -
Argentina -
Armenia -
Aruba -
Australia -
Austria -
Azerbaijan -
Bahamas -
Bahrain -
Bangladesh -
Barbados -
Belarus -
Belgium -
Belize -
Benin -
Bermuda -
Bhutan -
Bolivia -
BonaireSintEustatiusAndSaba -
BosniaAndHerzegovina -
Botswana -
BouvetIsland -
Brazil -
BritishIndianOceanTerritory -
BruneiDarussalam -
Bulgaria -
BurkinaFaso -
Burundi -
CaboVerde -
Cambodia -
Cameroon -
Canada -
CaymanIslands -
CentralAfricanRepublic -
Chad -
Chile -
China -
ChristmasIsland -
CocosIslands -
Colombia -
Comoros -
Congo -
CongoDemocraticRepublic -
CookIslands -
CostaRica -
CoteDIvoire -
Croatia -
Cuba -
Curacao -
Cyprus -
Czechia -
Denmark -
Djibouti -
Dominica -
DominicanRepublic -
Ecuador -
Egypt -
ElSalvador -
EquatorialGuinea -
Eritrea -
Estonia -
Eswatini -
Ethiopia -
FalklandIslands -
FaroeIslands -
Fiji -
Finland -
France -
FrenchGuiana -
FrenchPolynesia -
FrenchSouthernTerritories -
Gabon -
Gambia -
Georgia -
Germany -
Ghana -
Gibraltar -
Greece -
Greenland -
Grenada -
Guadeloupe -
Guam -
Guatemala -
Guernsey -
Guinea -
GuineaBissau -
Guyana -
Haiti -
HeardIslandAndMcDonaldIslands -
HolySee -
Honduras -
HongKong -
Hungary -
Iceland -
India -
Indonesia -
Iran -
Iraq -
Ireland -
IsleOfMan -
Israel -
Italy -
Jamaica -
Japan -
Jersey -
Jordan -
Kazakhstan -
Kenya -
Kiribati -
KoreaDemocraticPeoplesRepublic -
KoreaRepublic -
Kuwait -
Kyrgyzstan -
LaoPeoplesDemocraticRepublic -
Latvia -
Lebanon -
Lesotho -
Liberia -
Libya -
Liechtenstein -
Lithuania -
Luxembourg -
Macao -
Madagascar -
Malawi -
Malaysia -
Maldives -
Mali -
Malta -
MarshallIslands -
Martinique -
Mauritania -
Mauritius -
Mayotte -
Mexico -
Micronesia -
Moldova -
Monaco -
Mongolia -
Montenegro -
Montserrat -
Morocco -
Mozambique -
Myanmar -
Namibia -
Nauru -
Nepal -
Netherlands -
NewCaledonia -
NewZealand -
Nicaragua -
Niger -
Nigeria -
Niue -
NorfolkIsland -
NorthMacedonia -
NorthernMarianaIslands -
Norway -
Oman -
Pakistan -
Palau -
Palestine -
Panama -
PapuaNewGuinea -
Paraguay -
Peru -
Philippines -
Pitcairn -
Poland -
Portugal -
PuertoRico -
Qatar -
Reunion -
Romania -
RussianFederation -
Rwanda -
SaintBarthelemy -
SaintHelenaAscensionTristanDaCunha -
SaintKittsAndNevis -
SaintLucia -
SaintMartinFrenchPart -
SaintPierreAndMiquelon -
SaintVincentAndTheGrenadines -
Samoa -
SanMarino -
SaoTomeAndPrincipe -
SaudiArabia -
Senegal -
Serbia -
Seychelles -
SierraLeone -
Singapore -
SintMaartenDutchPart -
Slovakia -
Slovenia -
SolomonIslands -
Somalia -
SouthAfrica -
SouthGeorgiaSouthSandwichIslands -
SouthSudan -
Spain -
SriLanka -
Sudan -
Suriname -
SvalbardJanMayen -
Sweden -
Switzerland -
SyrianArabRepublic -
TaiwanProvinceOfChina -
Tajikistan -
Tanzania -
Thailand -
TimorLeste -
Togo -
Tokelau -
Tonga -
TrinidadAndTobago -
Tunisia -
Turkey -
Turkmenistan -
TurksAndCaicosIslands -
Tuvalu -
Uganda -
Ukraine -
UnitedArabEmirates -
UnitedKingdom -
UnitedStatesOfAmerica -
UnitedStatesOutlyingIslands -
Uruguay -
Uzbekistan -
Vanuatu -
Venezuela -
VietNam -
VirginIslandsBritish -
VirginIslandsUS -
WallisAndFutuna -
WesternSahara -
Yemen -
Zambia -
Zimbabwe
pub type CountryError {
IncorrectAlpha2Code
IncorrectAlpha3Code
IncorrectNumericCode
}
Constructors
-
IncorrectAlpha2Code -
IncorrectAlpha3Code -
IncorrectNumericCode
Values
pub fn alpha_2_code_from_string(
code a: String,
) -> Result(Alpha2Code, CountryError)
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn alpha_2_code_to_string(code a: Alpha2Code) -> String
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn alpha_3_code_from_string(
code code: String,
) -> Result(Alpha3Code, CountryError)
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn alpha_3_code_to_string(code a: Alpha3Code) -> String
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn from_alpha_2_code(code a: Alpha2Code) -> Country
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn from_alpha_3_code(code a: Alpha3Code) -> Country
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn from_int_numeric_code(
code c: Int,
) -> Result(Country, CountryError)
pub fn from_numeric_code(
code c: String,
) -> Result(Country, CountryError)
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn name(country c: Country) -> String
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn to_alpha_2_code(country c: Country) -> Alpha2Code
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn to_alpha_3_code(country c: Country) -> Alpha3Code
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/
pub fn to_numeric_code(country c: Country) -> String
standard ISO3166_1 source https://www.iso.org/obp/ui/#search/code/