#[repr(u8)]pub enum Language {
Show 19 variants
Auto = 0,
Arabic = 1,
Chinese = 2,
English = 3,
Esperanto = 4,
Finnish = 5,
French = 6,
German = 7,
Greek = 8,
Hebrew = 9,
Hindi = 10,
Indonesian = 11,
Korean = 12,
Portuguese = 13,
Romanian = 14,
Russian = 15,
Spanish = 16,
Tagalog = 17,
Vietnamese = 18,
}Expand description
A language understood by the reference parser.
Language::Auto searches all bundled languages. The remaining variants
represent concrete languages, including languages for which callers may
register their own aliases even when this crate does not bundle book names.
Variants§
Auto = 0
Search every language with bundled book aliases.
Arabic = 1
Arabic (ar).
Chinese = 2
Chinese (zh).
English = 3
English (en).
Esperanto = 4
Esperanto (eo), available for custom aliases.
Finnish = 5
Finnish (fi), available for custom aliases.
French = 6
French (fr).
German = 7
German (de).
Greek = 8
Greek (el), available for custom aliases.
Hebrew = 9
Hebrew (he).
Hindi = 10
Hindi (hi).
Indonesian = 11
Indonesian (id).
Korean = 12
Korean (ko).
Portuguese = 13
Portuguese (pt).
Romanian = 14
Romanian (ro), available for custom aliases.
Russian = 15
Russian (ru).
Spanish = 16
Spanish (es).
Tagalog = 17
Tagalog (tl).
Vietnamese = 18
Vietnamese (vi), available for custom aliases.
Implementations§
Source§impl Language
impl Language
Sourcepub const fn display_name(self) -> &'static str
pub const fn display_name(self) -> &'static str
The human-readable English name of this language.
Sourcepub const fn code(self) -> &'static str
pub const fn code(self) -> &'static str
The canonical ISO 639-1 code, or "auto" for auto-detection.
Sourcepub const fn identifier_prefix(self) -> &'static str
pub const fn identifier_prefix(self) -> &'static str
The ISO 639-2 identifier accepted for this language.
Sourcepub const fn aliases(self) -> &'static [&'static str]
pub const fn aliases(self) -> &'static [&'static str]
Supplemental identifiers in addition to the name and ISO codes.
Sourcepub fn all_aliases(self) -> impl Iterator<Item = &'static str>
pub fn all_aliases(self) -> impl Iterator<Item = &'static str>
Every accepted identifier for this language.
This includes the lowercase variant name, display name, two-letter code, three-letter identifier, and supplemental aliases.
Sourcepub const fn is_parsing_supported(self) -> bool
pub const fn is_parsing_supported(self) -> bool
Whether the crate bundles parsing aliases for this language or mode.
Trait Implementations§
impl Copy for Language
impl Eq for Language
Source§impl From<Language> for ReferenceFormatter
impl From<Language> for ReferenceFormatter
Source§fn from(language: Language) -> ReferenceFormatter
fn from(language: Language) -> ReferenceFormatter
Source§impl Ord for Language
impl Ord for Language
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Language
impl PartialOrd 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.