Enum whatlang::Lang
[−]
[src]
pub enum Lang { Aka, Amh, Arb, Azj, Bel, Ben, Bho, Bul, Ceb, Ces, Cmn, Dan, Deu, Ell, Eng, Epo, Est, Fin, Fra, Guj, Hat, Hau, Heb, Hin, Hrv, Hun, Ibo, Ilo, Ind, Ita, Jav, Jpn, Kan, Kat, Khm, Kin, Kor, Kur, Lav, Lit, Mai, Mal, Mar, Mkd, Mlg, Mya, Nep, Nld, Nno, Nob, Nya, Ori, Orm, Pan, Pes, Pol, Por, Ron, Run, Rus, Sin, Skr, Slv, Sna, Som, Spa, Srp, Swe, Tam, Tel, Tgl, Tha, Tir, Tuk, Tur, Uig, Ukr, Urd, Uzb, Vie, Ydd, Yor, Zul, }
Represents a language following ISO 639-3 standard.
Variants
Aka
Amh
Arb
Azj
Bel
Ben
Bho
Bul
Ceb
Ces
Cmn
Dan
Deu
Ell
Eng
Epo
Est
Fin
Fra
Guj
Hat
Hau
Heb
Hin
Hrv
Hun
Ibo
Ilo
Ind
Ita
Jav
Jpn
Kan
Kat
Khm
Kin
Kor
Kur
Lav
Lit
Mai
Mal
Mar
Mkd
Mlg
Mya
Nep
Nld
Nno
Nob
Nya
Ori
Orm
Pan
Pes
Pol
Por
Ron
Run
Rus
Sin
Skr
Slv
Sna
Som
Spa
Srp
Swe
Tam
Tel
Tgl
Tha
Tir
Tuk
Tur
Uig
Ukr
Urd
Uzb
Vie
Ydd
Yor
Zul
Methods
impl Lang
[src]
fn from_code<S: Into<String>>(code: S) -> Option<Lang>
Get enum by ISO 639-3 code as a string.
Example
use whatlang::Lang; assert_eq!(Lang::from_code("ukr"), Some(Lang::Ukr));
fn code(&self) -> &str
Convert enum into ISO 639-3 code as a string.
Example
use whatlang::Lang; assert_eq!(Lang::Ukr.code(), "ukr");
fn name(&self) -> &str
Get a language name in the language itself.
Example
use whatlang::Lang; assert_eq!(Lang::Ukr.name(), "Українська");
fn eng_name(&self) -> &str
Get a human readable name of the language in English.
Example
use whatlang::Lang; assert_eq!(Lang::Deu.eng_name(), "German");
Trait Implementations
impl PartialEq for Lang
[src]
fn eq(&self, __arg_0: &Lang) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Eq for Lang
[src]
impl Debug for Lang
[src]
impl Hash for Lang
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Lang
[src]
fn clone(&self) -> Lang
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more