Skip to main content

SchemeType

Enum SchemeType 

Source
#[repr(u8)]
pub enum SchemeType { Quanpin = 0, Shuangpin = 1, Wubi = 2, JapaneseRomaji = 3, Korean = 4, Cantonese = 5, Zhuyin = 6, Vietnamese = 7, Tibetan = 8, Stroke = 9, }
Expand description

Input scheme. The ordinal is part of the online identity ("<scheme>:<raw>") and of the host ABI.

Variants§

§

Quanpin = 0

§

Shuangpin = 1

§

Wubi = 2

§

JapaneseRomaji = 3

§

Korean = 4

韩语两套式或罗马字布局:音节在预编辑中组合,稳定前缀逐步上屏;Command::ConvertHanja 打开当前音节的汉字候选。

§

Cantonese = 5

Cantonese in toneless Jyutping read against msime-cantonese.db: candidates are Traditional as stored, a candidate covering the leading syllables commits at once and leaves the rest composing, and nothing is learned.

§

Zhuyin = 6

Zhuyin (bopomofo) on the Dachen layout read against msime-zhuyin.db: keys compose syllables that convert to Traditional text as typed, a list the user opens pins a span’s text without committing, Enter or any key outside the layout commits the conversion, and nothing is learned.

§

Vietnamese = 7

Vietnamese through Telex or VNI: the keystrokes compose into one word in the preedit, which any key outside the spelling commits; there are no candidates.

§

Tibetan = 8

藏文,在拉丁键盘上按 EWTS(扩展威利转写)拼写:威利原文在组字里组成一个音节串,显示为转换出的藏文;空格带音节点上屏,/ 带垂符上屏,回车只上屏藏文;没有候选。

§

Stroke = 9

Stroke (笔画) read against msime-stroke.db: the keys h s p n z type the five strokes 横竖撇点折 in writing order and x stands for any one stroke; the preedit draws the strokes, candidates are single characters whose stroke code starts with the typed strokes, and nothing is learned.

Implementations§

Source§

impl SchemeType

Source

pub fn from_u8(value: u8) -> Option<Self>

Source

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

The name the golden fixtures use.

Source

pub fn is_pinyin(self) -> bool

Source

pub const fn is_chinese(self) -> bool

A Chinese scheme: what 中文 returns to and what the Chinese statistics count.

Source

pub const fn outputs_traditional_natively(self) -> bool

The scheme’s own text is Traditional Chinese, so no script conversion is wanted.

Source

pub const fn script_conversion_applies(self) -> bool

The host’s Simplified-to-Traditional conversion applies to the scheme’s commits and preedit.

Source

pub const fn uses_chinese_punctuation(self) -> bool

The engine translates punctuation through the Chinese table. Korean writes half-width ASCII marks instead; Japanese goes through the table like the Chinese schemes.

Source

pub const fn host_smart_punctuation(self) -> bool

The host’s smart punctuation (context-dependent marks) may run.

Source

pub const fn widens_full_width(self) -> bool

Commits are widened when the full-width switch is on.

Source

pub const fn allows_english_emoji_mixing(self) -> bool

English words and emoji or kaomoji may be mixed into the candidate list.

Source

pub const fn opens_local_modes(self) -> bool

没有组字时,Shift+字母打开按拼音拼写查的本地模式(E、M、J、R)和计算模式 V;K、C、U、T、Y、S 和 /、@ 由 opens_table_modes 判断(InputSession::local_mode_for_entry)。

Source

pub const fn opens_table_modes(self) -> bool

没有组字时,Shift+K 打开短语模式,/ 和 @ 打开指令和提及模式,Shift+C、U、T、Y、S 打开拆字、Unicode、日期时间、临时英文和符号模式;五笔也提供这些不经过方案拼写的入口。

Source

pub const fn filters_to_single_characters(self) -> bool

「只出单字」打开时,候选里去掉含汉字的词和整句,只留单个汉字。只用于选一个候选就上屏、剩下的拼写接着组字的方案;注音的候选列表是给组字里的一段改字,笔画本来只出单字。

Source

pub const fn detects_urls(self) -> bool

组字中键入 www.、http: 等时进入网址模式。

Source

pub const fn learns_into_main_dictionary(self) -> bool

Selections adjust frequencies and store sentences in the main dictionary and journal.

Source

pub const fn learns_english_words(self) -> bool

Letters committed raw that are not a complete spelling are learned as an English word.

Source

pub const fn cloud_eligible(self) -> bool

The engine raises cloud queries for the composition.

Source

pub const fn shows_glosses(self) -> bool

Candidates may carry translation glosses. Korean’s are the Hanja rows, glossed and translated like Chinese ones under their 훈음.

Source

pub const fn commits_on_blur(self) -> bool

Focus loss or a scheme switch commits the composition instead of discarding it.

Source

pub const fn holds_phrase_progress(self) -> bool

A partial selection is held as phrase progress rather than committed at once.

Source

pub const fn reranks_with_sentence_model(self) -> bool

The candidate list may be reordered by the sentence model and the personal context.

Source

pub const fn draws_reading(self) -> bool

The snapshot’s reading carries the composed text (kana, Hangul, the Zhuyin conversion, the Stroke glyphs 一丨丿丶乛) for the host to draw.

Source

pub const fn has_openable_candidate_list(self) -> bool

Candidates appear only in a list the user opens (Command::ConvertHanja: the Korean Hanja list, the Zhuyin list), and the list can be closed again.

Source

pub const fn cancel_keeps_composition(self) -> bool

第一次 Cancel 保留组字:关闭打开的候选列表,或把越南文、藏文的组字切回按键原文。第二次 Cancel 才丢弃它。

Source

pub const fn selection_completes(self) -> bool

Selecting any of the scheme’s candidates finishes the composition. Native wubi rows also finish, which is decided per row because a mixed wubi list holds pinyin rows too.

Source

pub const fn follows_pinyin_candidates(self) -> bool

The candidate list reads the composition as pinyin, so selections advance and learn as pinyin.

Source

pub const fn accepts_apostrophe(self) -> bool

An apostrophe typed inside the composition is a syllable boundary the scheme keeps.

Source

pub const fn locks_caret(self) -> bool

The caret stays at the end of the composition.

Source

pub const fn supports_fuzzy(self) -> bool

Fuzzy pinyin rules apply.

Source

pub const fn supports_autocorrect(self) -> bool

Typo autocorrection applies and its outcomes are learned.

Source

pub const fn nine_key(self) -> bool

九键网格能拼出该方案的音节:全拼用拼音九宫格,注音用注音九键。

Source

pub const fn helpcode(self) -> bool

The scheme has a helpcode switch and its candidates carry helpcode annotations.

Trait Implementations§

Source§

impl Clone for SchemeType

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 SchemeType

Source§

impl Debug for SchemeType

Source§

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

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

impl Default for SchemeType

Source§

fn default() -> Self

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

impl Eq for SchemeType

Source§

impl Hash for SchemeType

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 SchemeType

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 SchemeType

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.