Skip to main content

Language

Enum Language 

Source
pub enum Language {
Show 184 variants Unspecified, AA, AB, AE, AF, AK, AM, AN, AR, AS, AV, AY, AZ, BA, BE, BG, BI, BM, BN, BO, BR, BS, CA, CE, CH, CO, CR, CS, CU, CV, CY, DA, DE, DV, DZ, EE, EL, EN, EO, ES, ET, EU, FA, FF, FI, FJ, FO, FR, FY, GA, GD, GL, GN, GU, GV, HA, HE, HI, HO, HR, HT, HU, HY, HZ, IA, ID, IE, IG, II, IK, IO, IS, IT, IU, JA, JV, KA, KG, KI, KJ, KK, KL, KM, KN, KO, KR, KS, KU, KV, KW, KY, LA, LB, LG, LI, LN, LO, LT, LU, LV, MG, MH, MI, MK, ML, MN, MR, MS, MT, MY, NA, NB, ND, NE, NG, NL, NN, NO, NR, NV, NY, OC, OJ, OM, OR, OS, PA, PI, PL, PS, PT, QU, RM, RN, RO, RU, RW, SA, SC, SD, SE, SG, SI, SK, SL, SM, SN, SO, SQ, SR, SS, ST, SU, SV, SW, TA, TE, TG, TH, TI, TK, TL, TN, TO, TR, TS, TT, TW, TY, UG, UK, UR, UZ, VE, VI, VO, WA, WO, XH, YI, YO, ZA, ZH, ZU,
}
Expand description

A language identified by an ISO 639-1 alpha-2 code.

Codes use lowercase ASCII letters (ISO 639-1:2002 section 4.1). Only codes represented by the variants are accepted.

The default is Unspecified, with empty text views and zero-filled byte views. FIX serialization rejects it; Serde represents it as an empty string in both directions.

Variants§

§

Unspecified

No language has been specified.

§

AA

Afar

§

AB

Abkhazian

§

AE

Avestan

§

AF

Afrikaans

§

AK

Akan

§

AM

Amharic

§

AN

Aragonese

§

AR

Arabic

§

AS

Assamese

§

AV

Avaric

§

AY

Aymara

§

AZ

Azerbaijani

§

BA

Bashkir

§

BE

Belarusian

§

BG

Bulgarian

§

BI

Bislama

§

BM

Bambara

§

BN

Bengali

§

BO

Tibetan

§

BR

Breton

§

BS

Bosnian

§

CA

Catalan; Valencian

§

CE

Chechen

§

CH

Chamorro

§

CO

Corsican

§

CR

Cree

§

CS

Czech

§

CU

Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic

§

CV

Chuvash

§

CY

Welsh

§

DA

Danish

§

DE

German

§

DV

Divehi; Dhivehi; Maldivian

§

DZ

Dzongkha

§

EE

Ewe

§

EL

Modern Greek (1453-)

§

EN

English

§

EO

Esperanto

§

ES

Spanish; Castilian

§

ET

Estonian

§

EU

Basque

§

FA

Persian

§

FF

Fulah

§

FI

Finnish

§

FJ

Fijian

§

FO

Faroese

§

FR

French

§

FY

Western Frisian

§

GA

Irish

§

GD

Gaelic; Scottish Gaelic

§

GL

Galician

§

GN

Guarani

§

GU

Gujarati

§

GV

Manx

§

HA

Hausa

§

HE

Hebrew

§

HI

Hindi

§

HO

Hiri Motu

§

HR

Croatian

§

HT

Haitian; Haitian Creole

§

HU

Hungarian

§

HY

Armenian

§

HZ

Herero

§

IA

Interlingua (International Auxiliary Language Association)

§

ID

Indonesian

§

IE

Interlingue; Occidental

§

IG

Igbo

§

II

Sichuan Yi; Nuosu

§

IK

Inupiaq

§

IO

Ido

§

IS

Icelandic

§

IT

Italian

§

IU

Inuktitut

§

JA

Japanese

§

JV

Javanese

§

KA

Georgian

§

KG

Kongo

§

KI

Kikuyu; Gikuyu

§

KJ

Kuanyama; Kwanyama

§

KK

Kazakh

§

KL

Kalaallisut; Greenlandic

§

KM

Central Khmer

§

KN

Kannada

§

KO

Korean

§

KR

Kanuri

§

KS

Kashmiri

§

KU

Kurdish

§

KV

Komi

§

KW

Cornish

§

KY

Kirghiz; Kyrgyz

§

LA

Latin

§

LB

Luxembourgish; Letzeburgesch

§

LG

Ganda

§

LI

Limburgan; Limburger; Limburgish

§

LN

Lingala

§

LO

Lao

§

LT

Lithuanian

§

LU

Luba-Katanga

§

LV

Latvian

§

MG

Malagasy

§

MH

Marshallese

§

MI

Maori

§

MK

Macedonian

§

ML

Malayalam

§

MN

Mongolian

§

MR

Marathi

§

MS

Malay

§

MT

Maltese

§

MY

Burmese

§

NA

Nauru

§

NB

Norwegian Bokmal

§

ND

North Ndebele

§

NE

Nepali

§

NG

Ndonga

§

NL

Dutch; Flemish

§

NN

Norwegian Nynorsk

§

NO

Norwegian

§

NR

South Ndebele

§

NV

Navajo; Navaho

§

NY

Chichewa; Chewa; Nyanja

§

OC

Occitan (post 1500)

§

OJ

Ojibwa

§

OM

Oromo

§

OR

Oriya

§

OS

Ossetian; Ossetic

§

PA

Panjabi; Punjabi

§

PI

Pali

§

PL

Polish

§

PS

Pushto; Pashto

§

PT

Portuguese

§

QU

Quechua

§

RM

Romansh

§

RN

Rundi

§

RO

Romanian; Moldavian; Moldovan

§

RU

Russian

§

RW

Kinyarwanda

§

SA

Sanskrit

§

SC

Sardinian

§

SD

Sindhi

§

SE

Northern Sami

§

SG

Sango

§

SI

Sinhala; Sinhalese

§

SK

Slovak

§

SL

Slovenian

§

SM

Samoan

§

SN

Shona

§

SO

Somali

§

SQ

Albanian

§

SR

Serbian

§

SS

Swati

§

ST

Sotho, Southern

§

SU

Sundanese

§

SV

Swedish

§

SW

Swahili

§

TA

Tamil

§

TE

Telugu

§

TG

Tajik

§

TH

Thai

§

TI

Tigrinya

§

TK

Turkmen

§

TL

Tagalog

§

TN

Tswana

§

TO

Tonga (Tonga Islands)

§

TR

Turkish

§

TS

Tsonga

§

TT

Tatar

§

TW

Twi

§

TY

Tahitian

§

UG

Uighur; Uyghur

§

UK

Ukrainian

§

UR

Urdu

§

UZ

Uzbek

§

VE

Venda

§

VI

Vietnamese

§

VO

Volapuk

§

WA

Walloon

§

WO

Wolof

§

XH

Xhosa

§

YI

Yiddish

§

YO

Yoruba

§

ZA

Zhuang; Chuang

§

ZH

Chinese

§

ZU

Zulu

Implementations§

Source§

impl Language

Source

pub const fn from_bytes(input: &[u8]) -> Option<Self>

Read an assigned code, returning None for unknown codes or invalid lengths. Empty input and zero-filled byte arrays are not codes.

Source

pub const fn is_empty(&self) -> bool

Whether no language has been specified.

Source

pub const fn to_bytes(self) -> [u8; 2]

Return the two-letter language code, or two zero bytes if unspecified.

Source

pub const fn as_str(&self) -> &'static str

Borrow the two-letter language code as a string. Returns an empty string if unspecified.

Source

pub const fn as_fix_str(&self) -> &'static FixStr

Borrow the two-letter language code as a FIX string. Returns an empty string if unspecified.

Source

pub const fn as_bytes(&self) -> &'static [u8; 2]

Borrow the two-letter language code, or two zero bytes if unspecified.

Trait Implementations§

Source§

impl Clone for Language

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Language

Source§

impl Debug for Language

Source§

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

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

impl Default for Language

Source§

fn default() -> Self

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

impl Eq for Language

Source§

impl PartialEq for Language

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Language

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.