[][src]Enum elasticlunr::lang::Language

pub enum Language {
    English,
    Danish,
    Dutch,
    Finnish,
    French,
    German,
    Italian,
    Portuguese,
    Romanian,
    Russian,
    Spanish,
    Swedish,
    Turkish,
    Chinese,
    Japanese,
    // some variants omitted
}

Used to configure the Index for a specific lanugage.

Variants

English
Danish
Dutch
Finnish
French
German
Italian
Portuguese
Romanian
Russian
Spanish
Swedish
Turkish
Chinese
Japanese

Methods

impl Language[src]

pub fn from_code(code: &str) -> Option<Language>[src]

Returns the Language for the given two-character ISO 639-1 language code if the language is supported. Returns None if not supported.

Note:

The ISO 639-1 code for Dutch is "nl". However "du" is used for the module name and pipeline suffix in order to match lunr-languages.

pub fn to_code(&self) -> &'static str[src]

Returns the two-character ISO 639-1 language code for the Language.

Note:

The ISO 639-1 code for Dutch is "nl". However "du" is used for the module name and pipeline suffix in order to match lunr-languages.

pub fn make_pipeline(&self) -> Pipeline[src]

Creates a pipeline for the Language.

Trait Implementations

impl Clone for Language[src]

impl Copy for Language[src]

impl Debug for Language[src]

impl<'de> Deserialize<'de> for Language[src]

impl Eq for Language[src]

impl FromStr for Language[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl IntoEnumIterator for Language[src]

impl PartialEq<Language> for Language[src]

impl Serialize for Language[src]

impl StructuralEq for Language[src]

impl StructuralPartialEq for Language[src]

impl ToString for Language[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.