Enum hypher::Lang

source ·
#[non_exhaustive]
pub enum Lang {
Show 35 variants Afrikaans, Albanian, Belarusian, Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Georgian, German, Greek, Hungarian, Icelandic, Italian, Kurmanji, Latin, Lithuanian, Mongolian, Norwegian, Polish, Portuguese, Russian, Serbian, Slovak, Slovenian, Spanish, Swedish, 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)

§

Belarusian

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

§

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)

§

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)

§

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)

§

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)

§

Mongolian

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

§

Norwegian

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

§

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)

§

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)

§

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.

Trait Implementations§

source§

impl Clone for Lang

source§

fn clone(&self) -> Lang

Returns a copy 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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 RefUnwindSafe for Lang

§

impl Send for Lang

§

impl Sync for Lang

§

impl Unpin 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> 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,

§

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>,

§

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>,

§

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.