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

Methods

impl Lang
[src]

Get enum by ISO 639-3 code as a string.

Example

use whatlang::Lang;
assert_eq!(Lang::from_code("ukr"), Some(Lang::Ukr));

Convert enum into ISO 639-3 code as a string.

Example

use whatlang::Lang;
assert_eq!(Lang::Ukr.code(), "ukr");

Get a language name in the language itself.

Example

use whatlang::Lang;
assert_eq!(Lang::Ukr.name(), "Українська");

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]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Lang
[src]

impl Debug for Lang
[src]

Formats the value using the given formatter.

impl Hash for Lang
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for Lang
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Lang
[src]

impl Display for Lang
[src]

Formats the value using the given formatter. Read more