#[non_exhaustive]pub enum Language {
English,
German,
French,
Spanish,
Italian,
Dutch,
Portuguese,
Swedish,
Norwegian,
Danish,
Finnish,
Russian,
}Expand description
A language the analyzer can stem and stop-word-filter for.
Selected from a BCP-47 language tag (de, en-US) when present;
untagged text uses the analyzer’s configured default. The set mirrors
the supported Snowball stemmer algorithms and is #[non_exhaustive]
so more can be added without breaking callers.
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.
English
English.
German
German.
French
French.
Spanish
Spanish.
Italian
Italian.
Dutch
Dutch.
Portuguese
Portuguese.
Swedish
Swedish.
Norwegian
Norwegian.
Danish
Danish.
Finnish
Finnish.
Russian
Russian.
Implementations§
Source§impl Language
impl Language
Sourcepub fn from_tag(tag: &str) -> Option<Self>
pub fn from_tag(tag: &str) -> Option<Self>
Resolve a BCP-47 language tag to a supported Language.
Only the primary subtag is significant: en, en-US, and
en_GB all resolve to Language::English. An unsupported or
malformed tag yields None, leaving the caller to fall back to
its configured default.
Trait Implementations§
impl Copy for Language
impl Eq for Language
impl StructuralPartialEq for Language
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnsafeUnpin for Language
impl UnwindSafe for Language
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more