Skip to main content

LocalInputMode

Enum LocalInputMode 

Source
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

Source

pub fn name(self) -> &'static str

The name hosts and goldens use (EngineSnapshot::local_mode).

Source

pub fn from_name(name: &str) -> Option<Self>

The mode name returns the name of; None for a name no mode has.

Source

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.

Source

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.

Source

pub fn without_entry_marker(self, text: &str) -> &str

去掉临时模式预编辑开头的入口字母(Y、R)。它是模式标记、不是用户打的字,所以进词库的词不能带它;回车原样上屏时它算文本(#7616),那一处不走这里。

Source

pub fn annotates_rows(self) -> bool

候选注释由 Engine 自己给出、不补辅助码的模式:V、/、@ 的行不是按拼音拼出来的,辅助码说明不了它们;拆字的行注释的是字的读音,用户正是不会读这个字才来查,辅助码夹在读音里只会添乱。和 generates_text 分开,是因为拆字上屏的字是用户挑出来的,照常计入打字统计。

Trait Implementations§

Source§

impl Clone for LocalInputMode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LocalInputMode

Source§

impl Debug for LocalInputMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LocalInputMode

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for LocalInputMode

Source§

impl Hash for LocalInputMode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for LocalInputMode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LocalInputMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.