pub enum LanguageCode {
English,
French,
Russian,
German,
Finnish,
}Variants§
Implementations§
source§impl LanguageCode
impl LanguageCode
pub fn from_wiktionary_abbreviation(string: &str) -> Result<Self>
pub fn to_wiktionary_abbreviation(&self) -> &'static str
pub fn from_english_name(string: &str) -> Result<Self>
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 Ord for LanguageCode
impl Ord for LanguageCode
source§fn cmp(&self, other: &LanguageCode) -> Ordering
fn cmp(&self, other: &LanguageCode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
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 ==.source§impl PartialOrd<LanguageCode> for LanguageCode
impl PartialOrd<LanguageCode> for LanguageCode
source§fn partial_cmp(&self, other: &LanguageCode) -> Option<Ordering>
fn partial_cmp(&self, other: &LanguageCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl 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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.