pub enum LocalInputMode {
Show 15 variants
None,
Unicode,
DateTime,
QuickPhrase,
Emoji,
Kaomoji,
SuperJianpin,
TemporaryEnglish,
TemporaryJapanese,
Expression,
Command,
Mention,
Url,
Chaizi,
Symbol,
}Variants§
None
Unicode
DateTime
QuickPhrase
Emoji
Kaomoji
SuperJianpin
TemporaryEnglish
TemporaryJapanese
Expression
V: a calculator, Chinese numerals and dates.
Command
/: built-in commands and the host’s command table.
Mention
@: the names and places of the host’s mention list.
Url
在全拼、双拼、五笔的组字中键入 www.、http: 等之后:原样输入的 ASCII 网址。
Chaizi
C:拆字反查,按部件的拼音找字(huohuohuo 得 焱)。
Symbol
S:符号模式,按分组码(xl、sx、szq、jt)或符号名(alpha、infinity)查符号。
Implementations§
Source§impl LocalInputMode
impl LocalInputMode
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
The mode name returns the name of; None for a name no mode has.
Sourcepub fn spelling_symbols(self) -> &'static str
pub fn spelling_symbols(self) -> &'static str
The non-letter characters the mode spells with. The runtime hands these to character even when a host reports them as punctuation, because finishing the composition on them would commit a half-typed spelling; hosts read digits here as input rather than candidate shortcuts.
Sourcepub fn generates_text(self) -> bool
pub fn generates_text(self) -> bool
Whether the mode’s rows are text the engine generated rather than words the user spelled. Their commits are never learned and never counted as typing.
Sourcepub fn without_entry_marker(self, text: &str) -> &str
pub fn without_entry_marker(self, text: &str) -> &str
去掉临时模式预编辑开头的入口字母(Y、R)。它是模式标记、不是用户打的字,所以进词库的词不能带它;回车原样上屏时它算文本(#7616),那一处不走这里。
Sourcepub fn annotates_rows(self) -> bool
pub fn annotates_rows(self) -> bool
候选注释由 Engine 自己给出、不补辅助码的模式:V、/、@ 的行不是按拼音拼出来的,辅助码说明不了它们;拆字的行注释的是字的读音,用户正是不会读这个字才来查,辅助码夹在读音里只会添乱。和 generates_text 分开,是因为拆字上屏的字是用户挑出来的,照常计入打字统计。
Trait Implementations§
Source§impl Clone for LocalInputMode
impl Clone for LocalInputMode
impl Copy for LocalInputMode
Source§impl Debug for LocalInputMode
impl Debug for LocalInputMode
Source§impl Default for LocalInputMode
impl Default for LocalInputMode
impl Eq for LocalInputMode
Source§impl Hash for LocalInputMode
impl Hash for LocalInputMode
Source§impl PartialEq for LocalInputMode
impl PartialEq for LocalInputMode
impl StructuralPartialEq for LocalInputMode
Auto Trait Implementations§
impl Freeze for LocalInputMode
impl RefUnwindSafe for LocalInputMode
impl Send for LocalInputMode
impl Sync for LocalInputMode
impl Unpin for LocalInputMode
impl UnsafeUnpin for LocalInputMode
impl UnwindSafe for LocalInputMode
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> 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.