Enum elasticlunr::lang::Language [−][src]
pub enum Language { English, Danish, Dutch, Finnish, French, German, Italian, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, // 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
Methods
impl Language
[src]
impl Language
pub fn from_code(code: &str) -> Option<Language>
[src]
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.
pub fn to_code(&self) -> &'static str
[src]
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.
pub fn make_pipeline(&self) -> Pipeline
[src]
pub fn make_pipeline(&self) -> Pipeline
Creates a pipeline for the Language
.
Trait Implementations
impl Copy for Language
[src]
impl Copy for Language
impl Clone for Language
[src]
impl Clone for Language
fn clone(&self) -> Language
[src]
fn clone(&self) -> Language
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for Language
[src]
impl Eq for Language
impl PartialEq for Language
[src]
impl PartialEq for Language
fn eq(&self, other: &Language) -> bool
[src]
fn eq(&self, other: &Language) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Debug for Language
[src]
impl Debug for Language
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for Language
[src]
impl FromStr for Language
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Language, Self::Err>
[src]
fn from_str(s: &str) -> Result<Language, Self::Err>
Parses a string s
to return a value of this type. Read more
impl ToString for Language
[src]
impl ToString for Language
impl IntoEnumIterator for Language
[src]
impl IntoEnumIterator for Language
type Iterator = LanguageIter
ⓘImportant traits for LanguageIterfn iter() -> LanguageIter
[src]
fn iter() -> LanguageIter