Enum elasticlunr::lang::Language
source · pub enum Language {
Show 13 variants
English,
Danish,
Dutch,
Finnish,
French,
German,
Italian,
Portuguese,
Romanian,
Russian,
Spanish,
Swedish,
Turkish,
// some variants omitted
}
Expand description
Used to configure the Index
for a specific lanugage.
Variants§
English
Danish
Dutch
Finnish
French
German
Italian
Portuguese
Romanian
Russian
Spanish
Swedish
Turkish
Implementations§
source§impl Language
impl Language
sourcepub fn from_code(code: &str) -> Option<Language>
pub fn from_code(code: &str) -> Option<Language>
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.
sourcepub fn to_code(&self) -> &'static str
pub fn to_code(&self) -> &'static str
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.
sourcepub fn make_pipeline(&self) -> Pipeline
pub fn make_pipeline(&self) -> Pipeline
Creates a pipeline for the Language
.