Enum IOC

Source
pub enum IOC {
Show 205 variants AND, UAE, AFG, ANT, ALB, ARM, ANG, ARG, ASA, AUT, AUS, ARU, AZE, BIH, BAR, BAN, BEL, BUR, BUL, BRN, BDI, BEN, BER, BRU, BOL, BRA, BAH, BHU, BOT, BLR, BIZ, CAN, COD, CAF, CGO, SUI, CIV, COK, CHI, CMR, CHN, COL, CRC, CUB, CPV, CYP, CZE, GER, DJI, DEN, DMA, DOM, ALG, ECU, EST, EGY, ERI, ESP, ETH, FIN, FIJ, FSM, FRO, FRA, GAB, GBR, GRN, GEO, GHA, GAM, GUI, GEQ, GRE, GUA, GUM, GBS, GUY, HKG, HON, CRO, HAI, HUN, INA, IRL, ISR, IND, IRQ, IRI, ISL, ITA, JAM, JOR, JPN, KEN, KGZ, CAM, KIR, COM, SKN, PRK, KOR, KUW, CAY, KAZ, LAO, LIB, LCA, LIE, SRI, LBR, LES, LTU, LUX, LAT, LBA, MAR, MON, MDA, MNE, MAD, MHL, MKD, MLI, MYA, MGL, MTN, MLT, MRI, MDV, MAW, MEX, MAS, MOZ, NAM, NIG, NGR, NCA, NED, NOR, NEP, NRU, NZL, OMA, PAN, PER, PNG, PHI, PAK, POL, PUR, PLE, POR, PLW, PAR, QAT, ROU, SRB, RUS, RWA, KSA, SOL, SEY, SUD, SWE, SGP, SLO, SVK, SLE, SMR, SEN, SOM, SUR, STP, ESA, SYR, SWZ, CHA, TOG, THA, TJK, TLS, TKM, TUN, TGA, TUR, TRI, TUV, TPE, TAN, UKR, UGA, USA, URU, UZB, VIN, VEN, IVB, ISV, VIE, VAN, SAM, YEM, RSA, ZAM, ZIM,
}
Expand description

An enum containing International Olympic Committee (IOC) codes.

§Example

use keshvar::{IOC, Alpha2};

assert_eq!(Ok(IOC::BER), IOC::try_from("ber"));
assert_eq!(IOC::BER.to_alpha2(), Alpha2::BM); // Bermuda (Americas)

We usually need to convert Alpha2 to Country and use that object instead.

Variants§

§

AND

The Principality of Andorra (Europe)

§

UAE

The United Arab Emirates (Asia)

§

AFG

The Islamic Republic of Afghanistan (Asia)

§

ANT

Antigua and Barbuda (Americas)

§

ALB

The Republic of Albania (Europe)

§

ARM

The Republic of Armenia (Asia)

§

ANG

The Republic of Angola (Africa)

§

ARG

The Argentine Republic (Americas)

§

ASA

The Territory of American Samoa (Oceania)

§

AUT

The Republic of Austria (Europe)

§

AUS

The Commonwealth of Australia (Oceania)

§

ARU

Aruba (Americas)

§

AZE

The Republic of Azerbaijan (Asia)

§

BIH

Bosnia and Herzegovina (Europe)

§

BAR

Barbados (Americas)

§

BAN

The People’s Republic of Bangladesh (Asia)

§

BEL

The Kingdom of Belgium (Europe)

§

BUR

Burkina Faso (Africa)

§

BUL

The Republic of Bulgaria (Europe)

§

BRN

The Kingdom of Bahrain (Asia)

§

BDI

The Republic of Burundi (Africa)

§

BEN

The Republic of Benin (Africa)

§

BER

Bermuda (Americas)

§

BRU

The Nation of Brunei, the Abode of Peace (Asia)

§

BOL

The Plurinational State of Bolivia (Americas)

§

BRA

The Federative Republic of Brazil (Americas)

§

BAH

The Commonwealth of The Bahamas (Americas)

§

BHU

The Kingdom of Bhutan (Asia)

§

BOT

The Republic of Botswana (Africa)

§

BLR

The Republic of Belarus (Europe)

§

BIZ

Belize (Americas)

§

CAN

Canada (Americas)

§

COD

The Democratic Republic of the Congo (Africa)

§

CAF

The Central African Republic (Africa)

§

CGO

The Republic of the Congo (Africa)

§

SUI

The Swiss Confederation (Europe)

§

CIV

The Republic of Côte d’Ivoire (Africa)

§

COK

The Cook Islands (Oceania)

§

CHI

The Republic of Chile (Americas)

§

CMR

The Republic of Cameroon (Africa)

§

CHN

The People’s Republic of China (Asia)

§

COL

The Republic of Colombia (Americas)

§

CRC

The Republic of Costa Rica (Americas)

§

CUB

The Republic of Cuba (Americas)

§

CPV

The Republic of Cabo Verde (Africa)

§

CYP

The Republic of Cyprus (Asia)

§

CZE

The Czech Republic (Europe)

§

GER

The Federal Republic of Germany (Europe)

§

DJI

The Republic of Djibouti (Africa)

§

DEN

The Kingdom of Denmark (Europe)

§

DMA

The Commonwealth of Dominica (Americas)

§

DOM

The Dominican Republic (Americas)

§

ALG

The People’s Democratic Republic of Algeria (Africa)

§

ECU

The Republic of Ecuador (Americas)

§

EST

The Republic of Estonia (Europe)

§

EGY

The Arab Republic of Egypt (Africa)

§

ERI

The State of Eritrea (Africa)

§

ESP

The Kingdom of Spain (Europe)

§

ETH

The Federal Democratic Republic of Ethiopia (Africa)

§

FIN

The Republic of Finland (Europe)

§

FIJ

The Republic of Fiji (Oceania)

§

FSM

The Federated States of Micronesia (Oceania)

§

FRO

The Faroe Islands (Europe)

§

FRA

The French Republic (Europe)

§

GAB

The Gabonese Republic (Africa)

§

GBR

The United Kingdom of Great Britain and Northern Ireland (Europe)

§

GRN

Grenada (Americas)

§

GEO

Georgia (Asia)

§

GHA

The Republic of Ghana (Africa)

§

GAM

The Republic of The Gambia (Africa)

§

GUI

The Republic of Guinea (Africa)

§

GEQ

The Republic of Equatorial Guinea (Africa)

§

GRE

The Hellenic Republic (Europe)

§

GUA

The Republic of Guatemala (Americas)

§

GUM

The Territory of Guam (Oceania)

§

GBS

The Republic of Guinea-Bissau (Africa)

§

GUY

The Co-operative Republic of Guyana (Americas)

§

HKG

The Hong Kong Special Administrative Region of China (Asia)

§

HON

The Republic of Honduras (Americas)

§

CRO

The Republic of Croatia (Europe)

§

HAI

The Republic of Haiti (Americas)

§

HUN

Hungary (Europe)

§

INA

The Republic of Indonesia (Asia)

§

IRL

Ireland (Europe)

§

ISR

The State of Israel (Asia)

§

IND

The Republic of India (Asia)

§

IRQ

The Republic of Iraq (Asia)

§

IRI

The Islamic Republic of Iran (Asia)

§

ISL

Iceland (Europe)

§

ITA

The Italian Republic (Europe)

§

JAM

Jamaica (Americas)

§

JOR

The Hashemite Kingdom of Jordan (Asia)

§

JPN

Japan (Asia)

§

KEN

The Republic of Kenya (Africa)

§

KGZ

The Kyrgyz Republic (Asia)

§

CAM

The Kingdom of Cambodia (Asia)

§

KIR

The Republic of Kiribati (Oceania)

§

COM

The Union of the Comoros (Africa)

§

SKN

Saint Kitts and Nevis (Americas)

§

PRK

The Democratic People’s Republic of Korea (Asia)

§

KOR

The Republic of Korea (Asia)

§

KUW

The State of Kuwait (Asia)

§

CAY

The Cayman Islands (Americas)

§

KAZ

The Republic of Kazakhstan (Asia)

§

LAO

The Lao People’s Democratic Republic (Asia)

§

LIB

The Lebanese Republic (Asia)

§

LCA

Saint Lucia (Americas)

§

LIE

The Principality of Liechtenstein (Europe)

§

SRI

The Democratic Socialist Republic of Sri Lanka (Asia)

§

LBR

The Republic of Liberia (Africa)

§

LES

The Kingdom of Lesotho (Africa)

§

LTU

The Republic of Lithuania (Europe)

§

LUX

The Grand Duchy of Luxembourg (Europe)

§

LAT

The Republic of Latvia (Europe)

§

LBA

The State of Libya (Africa)

§

MAR

The Kingdom of Morocco (Africa)

§

MON

The Principality of Monaco (Europe)

§

MDA

The Republic of Moldova (Europe)

§

MNE

Montenegro (Europe)

§

MAD

The Republic of Madagascar (Africa)

§

MHL

The Republic of the Marshall Islands (Oceania)

§

MKD

The Republic of North Macedonia (Europe)

§

MLI

The Republic of Mali (Africa)

§

MYA

The Republic of the Union of Myanmar (Asia)

§

MGL

Mongolia (Asia)

§

MTN

The Islamic Republic of Mauritania (Africa)

§

MLT

The Republic of Malta (Europe)

§

MRI

The Republic of Mauritius (Africa)

§

MDV

The Republic of Maldives (Asia)

§

MAW

The Republic of Malawi (Africa)

§

MEX

The United Mexican States (Americas)

§

MAS

Malaysia (Asia)

§

MOZ

The Republic of Mozambique (Africa)

§

NAM

The Republic of Namibia (Africa)

§

NIG

The Republic of the Niger (Africa)

§

NGR

The Federal Republic of Nigeria (Africa)

§

NCA

The Republic of Nicaragua (Americas)

§

NED

The Kingdom of the Netherlands (Europe)

§

NOR

The Kingdom of Norway (Europe)

§

NEP

The Federal Democratic Republic of Nepal (Asia)

§

NRU

The Republic of Nauru (Oceania)

§

NZL

New Zealand (Oceania)

§

OMA

The Sultanate of Oman (Asia)

§

PAN

The Republic of Panamá (Americas)

§

PER

The Republic of Perú (Americas)

§

PNG

The Independent State of Papua New Guinea (Oceania)

§

PHI

The Republic of the Philippines (Asia)

§

PAK

The Islamic Republic of Pakistan (Asia)

§

POL

The Republic of Poland (Europe)

§

PUR

The Commonwealth of Puerto Rico (Americas)

§

PLE

The State of Palestine (Asia)

§

POR

The Portuguese Republic (Europe)

§

PLW

The Republic of Palau (Oceania)

§

PAR

The Republic of Paraguay (Americas)

§

QAT

The State of Qatar (Asia)

§

ROU

Romania (Europe)

§

SRB

The Republic of Serbia (Europe)

§

RUS

The Russian Federation (Europe)

§

RWA

The Republic of Rwanda (Africa)

§

KSA

The Kingdom of Saudi Arabia (Asia)

§

SOL

The Solomon Islands (Oceania)

§

SEY

The Republic of Seychelles (Africa)

§

SUD

The Republic of the Sudan (Africa)

§

SWE

The Kingdom of Sweden (Europe)

§

SGP

The Republic of Singapore (Asia)

§

SLO

The Republic of Slovenia (Europe)

§

SVK

The Slovak Republic (Europe)

§

SLE

The Republic of Sierra Leone (Africa)

§

SMR

The Republic of San Marino (Europe)

§

SEN

The Republic of Senegal (Africa)

§

SOM

The Federal Republic of Somalia (Africa)

§

SUR

The Republic of Suriname (Americas)

§

STP

The Democratic Republic of São Tomé and Príncipe (Africa)

§

ESA

The Republic of El Salvador (Americas)

§

SYR

The Syrian Arab Republic (Asia)

§

SWZ

The Kingdom of Eswatini (Africa)

§

CHA

The Republic of Chad (Africa)

§

TOG

The Togolese Republic (Africa)

§

THA

The Kingdom of Thailand (Asia)

§

TJK

The Republic of Tajikistan (Asia)

§

TLS

The Democratic Republic of Timor-Leste (Asia)

§

TKM

Turkmenistan (Asia)

§

TUN

The Republic of Tunisia (Africa)

§

TGA

The Kingdom of Tonga (Oceania)

§

TUR

The Republic of Türkiye (Asia)

§

TRI

The Republic of Trinidad and Tobago (Americas)

§

TUV

Tuvalu (Oceania)

§

TPE

Taiwan, Province of China (Asia)

§

TAN

The United Republic of Tanzania (Africa)

§

UKR

Ukraine (Europe)

§

UGA

The Republic of Uganda (Africa)

§

USA

The United States of America (Americas)

§

URU

The Oriental Republic of Uruguay (Americas)

§

UZB

The Republic of Uzbekistan (Asia)

§

VIN

Saint Vincent and the Grenadines (Americas)

§

VEN

The Bolivarian Republic of Venezuela (Americas)

§

IVB

The Virgin Islands (Americas)

§

ISV

The Virgin Islands of the United States (Americas)

§

VIE

The Socialist Republic of Viet Nam (Asia)

§

VAN

The Republic of Vanuatu (Oceania)

§

SAM

The Independent State of Samoa (Oceania)

§

YEM

The Republic of Yemen (Asia)

§

RSA

The Republic of South Africa (Africa)

§

ZAM

The Republic of Zambia (Africa)

§

ZIM

The Republic of Zimbabwe (Africa)

Implementations§

Source§

impl IOC

Source

pub fn to_alpha2(&self) -> Alpha2

Source

pub fn to_country(&self) -> Country

Trait Implementations§

Source§

impl Clone for IOC

Source§

fn clone(&self) -> IOC

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 IOC

Source§

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

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

impl<'de> Deserialize<'de> for IOC

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 IOC

Source§

fn eq(&self, other: &IOC) -> 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 IOC

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 ToString for IOC

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl TryFrom<&str> for IOC

Source§

type Error = SearchError

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

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for IOC

Source§

impl StructuralPartialEq for IOC

Auto Trait Implementations§

§

impl Freeze for IOC

§

impl RefUnwindSafe for IOC

§

impl Send for IOC

§

impl Sync for IOC

§

impl Unpin for IOC

§

impl UnwindSafe for IOC

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