#[non_exhaustive]#[repr(u8)]pub enum PersonalDictionaryKind {
Pinyin = 0,
Wubi = 1,
QuickPhrase = 2,
English = 3,
Wubi98 = 4,
}Expand description
Which dictionary a personal entry or journal row belongs to. The ordinal is the host ABI value.
non_exhaustive because the host facade re-exports this as the bridge’s DictionaryKind, a cxx shared enum that callers had to match with a wildcard arm (host-api dictionary.rs); a closed enum would turn those arms into unreachable_patterns warnings. Matches inside this crate stay exhaustive.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl PersonalDictionaryKind
impl PersonalDictionaryKind
pub fn from_u8(value: u8) -> Option<Self>
Sourcepub fn wubi_table(self) -> Option<&'static str>
pub fn wubi_table(self) -> Option<&'static str>
五笔种类对应的 msime-pinyin.db 码表。
Sourcepub fn journal_name(self) -> &'static str
pub fn journal_name(self) -> &'static str
The dictionary column value in user_dictionary_operations. Quick phrases are stored as quick.
pub fn from_journal_name(name: &str) -> Option<Self>
Trait Implementations§
Source§impl Clone for PersonalDictionaryKind
impl Clone for PersonalDictionaryKind
impl Copy for PersonalDictionaryKind
Source§impl Debug for PersonalDictionaryKind
impl Debug for PersonalDictionaryKind
Source§impl Default for PersonalDictionaryKind
impl Default for PersonalDictionaryKind
impl Eq for PersonalDictionaryKind
Source§impl Hash for PersonalDictionaryKind
impl Hash for PersonalDictionaryKind
Source§impl Ord for PersonalDictionaryKind
impl Ord for PersonalDictionaryKind
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PersonalDictionaryKind
impl PartialEq for PersonalDictionaryKind
Source§impl PartialOrd for PersonalDictionaryKind
impl PartialOrd for PersonalDictionaryKind
impl StructuralPartialEq for PersonalDictionaryKind
Auto Trait Implementations§
impl Freeze for PersonalDictionaryKind
impl RefUnwindSafe for PersonalDictionaryKind
impl Send for PersonalDictionaryKind
impl Sync for PersonalDictionaryKind
impl Unpin for PersonalDictionaryKind
impl UnsafeUnpin for PersonalDictionaryKind
impl UnwindSafe for PersonalDictionaryKind
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,
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
Compare self to
key and return true if they are equal.