Enum erg_common::lang::LanguageCode
source · pub enum LanguageCode {
English,
Japanese,
SimplifiedChinese,
TraditionalChinese,
Erg,
Python,
ErgOrPython,
}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 erg_or_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 is_pl(&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 for LanguageCode
impl PartialEq 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 ==.impl Copy for LanguageCode
impl Eq for LanguageCode
impl StructuralEq for LanguageCode
impl StructuralPartialEq for LanguageCode
Auto Trait Implementations§
impl RefUnwindSafe for LanguageCode
impl Send for LanguageCode
impl Sync for LanguageCode
impl Unpin for LanguageCode
impl UnwindSafe for LanguageCode
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