pub enum Language {
Show 23 variants
English,
Japanese,
German,
French,
Spanish,
Italian,
Chinese,
Russian,
Portuguese,
Arabic,
Dutch,
Korean,
Polish,
Swedish,
Danish,
Norwegian,
Finnish,
Turkish,
Hebrew,
Czech,
Hungarian,
Greek,
Other(String),
}Expand description
Language options for filtering articles
Variants§
English
Japanese
German
French
Spanish
Italian
Chinese
Russian
Portuguese
Arabic
Dutch
Korean
Polish
Swedish
Danish
Norwegian
Finnish
Turkish
Hebrew
Czech
Hungarian
Greek
Other(String)
Implementations§
Source§impl Language
impl Language
Sourcepub fn from_str_insensitive(s: &str) -> Self
pub fn from_str_insensitive(s: &str) -> Self
Parse a language from a case-insensitive string.
Accepts full English names ("english", "japanese", …) and ISO 639-2 three-letter codes
("eng", "jpn", …). Unrecognised values fall back to Language::Other(s) rather than
returning an error, so callers never need to handle the unknown-language case.
Trait Implementations§
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more