FlagCode

Enum FlagCode 

Source
#[non_exhaustive]
pub enum FlagCode {
Show 126 variants SyrianArabRepublic, Thailand, Turkmenistan, Tunisia, Turkey, TrinidadandTobago, Taiwan, Tanzania, Ukraine, UnitedNations, UnitedStates, Uruguay, Uzbekistan, Venezuela, VietNam, PuertoRico, Portugal, Paraguay, Qatar, Rainbow, Romania, Serbia, RussianFederation, SaudiArabia, Sweden, Singapore, Slovenia, Slovakia, SanMarino, Macedonia, Macao, Malta, Mexico, Malaysia, Nigeria, Netherlands, Norway, Nepal, NewZealand, Oman, Panama, Peru, Japan, DPRK, SouthKorea, Kuwait, Kazakhstan, Lebanon, Liechtenstein, SriLanka, Lithuania, Luxembourg, Latvia, Honduras, Croatia, Hungary, Indonesia, Ireland, Israel, IsleofMan, ImperialJapan, India, Iraq, Germany, Denmark, DominicanRepublic, Algeria, Ecuador, Estonia, Egypt, Spain, EuropeanUnion, Bahrain, Bolivia, Brazil, Bhutan, Belarus, Canada, Switzerland, Andorra, UnitedArabEmirates, Albania, Armenia, Chile, Antarctica, China, Argentina, Finland, Colombia, Austria, Iran, France, Communist, Australia, LibyanArabJamahiriya, Iceland, UnitedKingdom, Confederate, Azerbaijan, Morocco, Italy, Georgia, CostaRica, BosniaAndHerzegovina, Philippines, Monaco, Jamaica, Greece, Cuba, Bangladesh, Somalia, Pakistan, Moldova, Jordan, Guatemala, Cyprus, Belgium, SouthAfrica, ElSalvador, Poland, Montenegro, JollyRogers, HongKong, CzechRepublic, Bulgaria, Unknown(u16),
}
Expand description

All player flags currently available within the game.

This enum can be determined from a flag code string using the FromStr or TryFrom implementations. Usually the server will parse invalid flag code strings into the UnitedNations variant, but this is left up to the user.

§Restricted Flags

In the official server the following flags are restricted to players level 4 and above:

Changing flags in-game are restricted to those level 2 and above, although any (non-restricted) flag can be chosen when logging in.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SyrianArabRepublic

§

Thailand

§

Turkmenistan

§

Tunisia

§

Turkey

§

TrinidadandTobago

§

Taiwan

§

Tanzania

§

Ukraine

§

UnitedNations

§

UnitedStates

§

Uruguay

§

Uzbekistan

§

Venezuela

§

VietNam

§

PuertoRico

§

Portugal

§

Paraguay

§

Qatar

§

Rainbow

§

Romania

§

Serbia

§

RussianFederation

§

SaudiArabia

§

Sweden

§

Singapore

§

Slovenia

§

Slovakia

§

SanMarino

§

Macedonia

§

Macao

§

Malta

§

Mexico

§

Malaysia

§

Nigeria

§

Netherlands

§

Norway

§

Nepal

§

NewZealand

§

Oman

§

Panama

§

Peru

§

Japan

§

DPRK

§

SouthKorea

§

Kuwait

§

Kazakhstan

§

Lebanon

§

Liechtenstein

§

SriLanka

§

Lithuania

§

Luxembourg

§

Latvia

§

Honduras

§

Croatia

§

Hungary

§

Indonesia

§

Ireland

§

Israel

§

IsleofMan

§

ImperialJapan

§

India

§

Iraq

§

Germany

§

Denmark

§

DominicanRepublic

§

Algeria

§

Ecuador

§

Estonia

§

Egypt

§

Spain

§

EuropeanUnion

§

Bahrain

§

Bolivia

§

Brazil

§

Bhutan

§

Belarus

§

Canada

§

Switzerland

§

Andorra

§

UnitedArabEmirates

§

Albania

§

Armenia

§

Chile

§

Antarctica

§

China

§

Argentina

§

Finland

§

Colombia

§

Austria

§

Iran

§

France

§

Communist

§

Australia

§

LibyanArabJamahiriya

§

Iceland

§

UnitedKingdom

§

Confederate

§

Azerbaijan

§

Morocco

§

Italy

§

Georgia

§

CostaRica

§

BosniaAndHerzegovina

§

Philippines

§

Monaco

§

Jamaica

§

Greece

§

Cuba

§

Bangladesh

§

Somalia

§

Pakistan

§

Moldova

§

Jordan

§

Guatemala

§

Cyprus

§

Belgium

§

SouthAfrica

§

ElSalvador

§

Poland

§

Montenegro

§

JollyRogers

§

HongKong

§

CzechRepublic

§

Bulgaria

§

Unknown(u16)

Trait Implementations§

Source§

impl Clone for FlagCode

Source§

fn clone(&self) -> FlagCode

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 FlagCode

Source§

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

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

impl Default for FlagCode

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> DeserializeV5<'de> for FlagCode

Source§

impl<'a> From<FlagCode> for Cow<'a, str>

Source§

fn from(code: FlagCode) -> Cow<'a, str>

Converts to this type from the input type.
Source§

impl From<FlagCode> for String

Source§

fn from(code: FlagCode) -> String

Converts to this type from the input type.
Source§

impl From<FlagCode> for u16

Source§

fn from(v: FlagCode) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for FlagCode

Source§

fn from(v: u16) -> Self

Converts to this type from the input type.
Source§

impl FromStr for FlagCode

Source§

type Err = <FlagCode as TryFrom<String>>::Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for FlagCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FlagCode

Source§

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

Source§

fn serialize<'ser>( &self, ser: &mut AirmashSerializerV5<'ser>, ) -> Result<(), Error>

Source§

impl<'a> TryFrom<&'a str> for FlagCode

Source§

type Error = <FlagCode as TryFrom<String>>::Error

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

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<String> for FlagCode

Source§

type Error = ()

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

fn try_from(s: String) -> Result<Self, ()>

Performs the conversion.
Source§

impl Copy for FlagCode

Source§

impl Eq for FlagCode

Source§

impl StructuralPartialEq for FlagCode

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