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
AkaAmhArbAzjBelBenBhoBulCebCesCmnDanDeuEllEngEpoEstFinFraGujHatHauHebHinHrvHunIboIloIndItaJavJpnKanKatKhmKinKorKurLavLitMaiMalMarMkdMlgMyaNepNldNnoNobNyaOriOrmPanPesPolPorRonRunRusSinSkrSlvSnaSomSpaSrpSweTamTelTglThaTirTukTurUigUkrUrdUzbVieYddYorZulMethods
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 to_code(&self) -> &str
Convert enum into ISO 639-3 code as a string.
Example
use whatlang::Lang; assert_eq!(Lang::Ukr.to_code(), "ukr");
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) -> bool1.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