Enum erg_common::lang::LanguageCode
source · pub enum LanguageCode {
English,
Japanese,
SimplifiedChinese,
TraditionalChinese,
Erg,
Python,
}
Variants§
Implementations§
source§impl LanguageCode
impl LanguageCode
pub const fn en_patterns() -> [&'static str; 2]
pub const fn ja_patterns() -> [&'static str; 2]
pub const fn zh_cn_patterns() -> [&'static str; 2]
pub const fn zh_tw_patterns() -> [&'static str; 2]
pub const fn erg_patterns() -> [&'static str; 2]
pub const fn python_patterns() -> [&'static str; 2]
pub const fn patterns(&self) -> [&'static str; 2]
pub const fn is_en(&self) -> bool
pub const fn is_ja(&self) -> bool
pub const fn is_zh_cn(&self) -> bool
pub const fn is_zh_tw(&self) -> bool
pub const fn is_erg(&self) -> bool
pub const fn is_python(&self) -> bool
pub const fn matches_feature(&self) -> bool
pub fn as_str(&self) -> &str
Trait Implementations§
source§impl Clone for LanguageCode
impl Clone for LanguageCode
source§fn clone(&self) -> LanguageCode
fn clone(&self) -> LanguageCode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LanguageCode
impl Debug for LanguageCode
source§impl From<LanguageCode> for &str
impl From<LanguageCode> for &str
source§fn from(code: LanguageCode) -> Self
fn from(code: LanguageCode) -> Self
Converts to this type from the input type.
source§impl FromStr for LanguageCode
impl FromStr for LanguageCode
source§impl Hash for LanguageCode
impl Hash for LanguageCode
source§impl PartialEq<LanguageCode> for LanguageCode
impl PartialEq<LanguageCode> for LanguageCode
source§fn eq(&self, other: &LanguageCode) -> bool
fn eq(&self, other: &LanguageCode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.