Skip to main content

CandidateSource

Enum CandidateSource 

Source
#[repr(u8)]
pub enum CandidateSource {
Show 18 variants Database = 0, UserDatabase = 1, CloudSuggestion = 2, AiSuggestion = 3, EnglishDictionary = 4, QuickPhrase = 5, Emoji = 6, Kaomoji = 7, Generated = 8, Fallback = 9, NeuralKeyboard = 11, AiPending = 12, MixedJapanese = 13, Plugin = 14, CloudPending = 15, Contact = 16, Collocation = 17, Multilingual = 18,
}
Expand description

Where a candidate row came from. The discriminant is the wire value; never reorder.

Variants§

§

Database = 0

§

UserDatabase = 1

§

CloudSuggestion = 2

§

AiSuggestion = 3

§

EnglishDictionary = 4

§

QuickPhrase = 5

§

Emoji = 6

emoji 行,也用于混排的符号行(打拼音出符号,local::symbol_candidates):两者选中时都整段上屏、结束组字,不学习、不调频,也不能置顶、固定或删除。

§

Kaomoji = 7

§

Generated = 8

§

Fallback = 9

§

NeuralKeyboard = 11

A lattice path the keyboard (speed) sentence model picked.

§

AiPending = 12

AI 候选的占位行(#6888),已退役:共享内核不再产生它,AI 回答到达时第一条直接插在第一页最后一格(.agents/notes/implemented/feature/2026-10-16-ai-candidate-last-slot.md)。值保留不复用;引擎和宿主对它的处理(不能上屏、不学习、不计入统计、画成暗色)照旧,旧版本留下的行仍按这些规则处理。

§

MixedJapanese = 13

日文混输(实验选项,默认关)混进全拼、双拼候选的那一行:整段输入按罗马字转换出的最佳日文。它不属于下面任何一个谓词,所以选中时整段上屏并结束组字(与混输英文同一条路),不调词频、不记整句、不进个人上下文,也不能置顶、固定或删除;宿主不对它做简繁转换。

§

Plugin = 14

脚本插件在自己的 / 指令里给出的行,只在桌面产生(宿主经 Session::apply_plugin_command_rows 写进来)。它不属于下面任何一个谓词:选中时整段上屏并结束组字,不调词频、不记整句、不进个人上下文,不能置顶、固定或删除;runtime 不把它的上屏喂进 AI 上文,宿主不为它请求释义或翻译,上屏也不转全角。

§

CloudPending = 15

云候选尚在请求中;它占据云候选的固定位置,回答到达时由第一条云候选替换。值追加在已有 ABI 之后,不能复用旧值。

§

Contact = 16

Android 联系人导入提供的手机号候选;选中后直接上屏,不学习、不管理。

§

Collocation = 17

octagram .gram 语法模型参与词格解码时,解码首选的整句行。句子仍是词格 解出来的,搭配强度表只负责逐边加分;落库/学习判定与 Generated 同类。

§

Multilingual = 18

连续多语言转换的完整路径;整段消费,不调频、不学习跨语言整句,也不参与候选管理。

Implementations§

Source§

impl CandidateSource

Source

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

Source

pub fn is_online(self) -> bool

Source

pub fn is_cloud_pending(self) -> bool

Source

pub fn holds_ai_seat(self) -> bool

AI 行:AI 候选和已退役的占位行。

Source

pub fn takes_online_seat(self) -> bool

由在线座位规则摆放的行:云候选、AI 候选和已退役的 AI 占位行。

Source

pub fn is_generated_or_fallback(self) -> bool

整句猜出来的行:词格 Generated/Collocation、解码器 Fallback。 它们的选中都整段上屏、按词边界记进个人上下文、不落词库调频。

Source

pub fn is_sentence_learning(self) -> bool

Rows a direct selection stores as a user phrase, because there is no dictionary row whose frequency could be adjusted instead.

Source

pub fn is_dictionary(self) -> bool

Trait Implementations§

Source§

impl Clone for CandidateSource

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 CandidateSource

Source§

impl Debug for CandidateSource

Source§

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

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

impl Default for CandidateSource

Source§

fn default() -> Self

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

impl Eq for CandidateSource

Source§

impl Hash for CandidateSource

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 CandidateSource

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 CandidateSource

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.