Skip to main content

Lang

Enum Lang 

Source
#[non_exhaustive]
pub enum Lang {
Show 48 variants Afrikaans, Albanian, Assamese, Belarusian, Bengali, Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Galician, Georgian, German, Greek, Gujarati, Hindi, Hungarian, Icelandic, Italian, Kannada, Kurmanji, Latin, Lithuanian, Malayalam, Marathi, Mongolian, Norwegian, Oriya, Panjabi, Polish, Portuguese, Russian, Sanskrit, Serbian, Slovak, Slovenian, Spanish, Swedish, Tamil, Telugu, Turkish, Turkmen, Ukrainian,
}
Expand description

A language you can hyphenate in.

Lists for each language also the ISO 639-1 two letter language code and the ISO 15924 four letter script code.

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

Afrikaans

Hyphenation for Afrikaans. (Code: af, Script, Latn, Feature: afrikaans)

§

Albanian

Hyphenation for Albanian. (Code: sq, Script, Latn, Feature: albanian)

§

Assamese

Hyphenation for Assamese. (Code: as, Script, Beng, Feature: assamese)

§

Belarusian

Hyphenation for Belarusian. (Code: be, Script, Cyrl, Feature: belarusian)

§

Bengali

Hyphenation for Bengali. (Code: bn, Script, Beng, Feature: bengali)

§

Bulgarian

Hyphenation for Bulgarian. (Code: bg, Script, Cyrl, Feature: bulgarian)

§

Catalan

Hyphenation for Catalan. (Code: ca, Script, Latn, Feature: catalan)

§

Croatian

Hyphenation for Croatian. (Code: hr, Script, Latn, Feature: croatian)

§

Czech

Hyphenation for Czech. (Code: cs, Script, Latn, Feature: czech)

§

Danish

Hyphenation for Danish. (Code: da, Script, Latn, Feature: danish)

§

Dutch

Hyphenation for Dutch. (Code: nl, Script, Latn, Feature: dutch)

§

English

Hyphenation for English. (Code: en, Script, Latn, Feature: english)

§

Estonian

Hyphenation for Estonian. (Code: et, Script, Latn, Feature: estonian)

§

Finnish

Hyphenation for Finnish. (Code: fi, Script, Latn, Feature: finnish)

§

French

Hyphenation for French. (Code: fr, Script, Latn, Feature: french)

§

Galician

Hyphenation for Galician. (Code: gl, Script, Latn, Feature: galician)

§

Georgian

Hyphenation for Georgian. (Code: ka, Script, Geor, Feature: georgian)

§

German

Hyphenation for German. (Code: de, Script, Latn, Feature: german)

§

Greek

Hyphenation for Greek. (Code: el, Script, Grek, Feature: greek)

§

Gujarati

Hyphenation for Gujarati. (Code: gu, Script, Gujr, Feature: gujarati)

§

Hindi

Hyphenation for Hindi. (Code: hi, Script, Deva, Feature: hindi)

§

Hungarian

Hyphenation for Hungarian. (Code: hu, Script, Latn, Feature: hungarian)

§

Icelandic

Hyphenation for Icelandic. (Code: is, Script, Latn, Feature: icelandic)

§

Italian

Hyphenation for Italian. (Code: it, Script, Latn, Feature: italian)

§

Kannada

Hyphenation for Kannada. (Code: kn, Script, Knda, Feature: kannada)

§

Kurmanji

Hyphenation for Kurmanji. (Code: ku, Script, Latn, Feature: kurmanji)

§

Latin

Hyphenation for Latin. (Code: la, Script, Latn, Feature: latin)

§

Lithuanian

Hyphenation for Lithuanian. (Code: lt, Script, Latn, Feature: lithuanian)

§

Malayalam

Hyphenation for Malayalam. (Code: ml, Script, Mlym, Feature: malayalam)

§

Marathi

Hyphenation for Marathi. (Code: mr, Script, Deva, Feature: marathi)

§

Mongolian

Hyphenation for Mongolian. (Code: mn, Script, Cyrl, Feature: mongolian)

§

Norwegian

Hyphenation for Norwegian. (Code: no, Alias: nb, Alias: nn, Script, Latn, Feature: norwegian)

§

Oriya

Hyphenation for Oriya. (Code: or, Script, Orya, Feature: oriya)

§

Panjabi

Hyphenation for Panjabi. (Code: pa, Script, Guru, Feature: panjabi)

§

Polish

Hyphenation for Polish. (Code: pl, Script, Latn, Feature: polish)

§

Portuguese

Hyphenation for Portuguese. (Code: pt, Script, Latn, Feature: portuguese)

§

Russian

Hyphenation for Russian. (Code: ru, Script, Cyrl, Feature: russian)

§

Sanskrit

Hyphenation for Sanskrit. (Code: sa, Script, Deva, Feature: sanskrit)

§

Serbian

Hyphenation for Serbian. (Code: sr, Script, Cyrl, Feature: serbian)

§

Slovak

Hyphenation for Slovak. (Code: sk, Script, Latn, Feature: slovak)

§

Slovenian

Hyphenation for Slovenian. (Code: sl, Script, Latn, Feature: slovenian)

§

Spanish

Hyphenation for Spanish. (Code: es, Script, Latn, Feature: spanish)

§

Swedish

Hyphenation for Swedish. (Code: sv, Script, Latn, Feature: swedish)

§

Tamil

Hyphenation for Tamil. (Code: ta, Script, Taml, Feature: tamil)

§

Telugu

Hyphenation for Telugu. (Code: te, Script, Telu, Feature: telugu)

§

Turkish

Hyphenation for Turkish. (Code: tr, Script, Latn, Feature: turkish)

§

Turkmen

Hyphenation for Turkmen. (Code: tk, Script, Latn, Feature: turkmen)

§

Ukrainian

Hyphenation for Ukrainian. (Code: uk, Script, Cyrl, Feature: ukrainian)

Implementations§

Source§

impl Lang

Source

pub fn from_iso(code: [u8; 2]) -> Option<Self>

Select a language using its ISO 639-1 code.

Source

pub fn bounds(self) -> (usize, usize)

The default number of chars to each side between which breaking is forbidden.

This follows typographic conventions.

Source

pub fn hyphenation_character(self) -> Option<char>

The default character used to join syllables.

Returns Some('\u{ad}') (SOFT HYPHEN) for most languages, but None for Indic scripts where visual hyphenation is not conventional.

Trait Implementations§

Source§

impl Clone for Lang

Source§

fn clone(&self) -> Lang

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 Lang

Source§

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

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

impl Hash for Lang

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 Lang

Source§

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

Source§

impl Eq for Lang

Source§

impl StructuralPartialEq for Lang

Auto Trait Implementations§

§

impl Freeze for Lang

§

impl RefUnwindSafe for Lang

§

impl Send for Lang

§

impl Sync for Lang

§

impl Unpin for Lang

§

impl UnsafeUnpin for Lang

§

impl UnwindSafe for Lang

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.