Skip to main content

msime_engine_candidate

Struct msime_engine_candidate 

Source
#[repr(C)]
pub struct msime_engine_candidate { pub struct_size: u32, pub index: u32, pub source: u32, pub scheme: u32, pub flags: u32, pub fixed_position: i32, pub word: msime_engine_str, pub code: msime_engine_str, pub annotation: msime_engine_str, pub corrected_from: msime_engine_str, }
Expand description

一行候选(ABI 1.0),msime_engine_candidate_get 填写,收发规则同 msime_engine_result,字符串的有效期同 msime_engine_state。

Fields§

§struct_size: u32§index: u32

这一行的下标(就是传进来的那个)。

§source: u32

MSIME_ENGINE_SOURCE_*。

§scheme: u32

给出这一行的方案,MSIME_ENGINE_SCHEME_*(五笔混拼里的拼音行是全拼)。

§flags: u32

MSIME_ENGINE_CANDIDATE_* 的组合。

§fixed_position: i32

用户固定的位置 1..=5,没固定时 0。

§word: msime_engine_str§code: msime_engine_str

这一行匹配的编码,按输入的写法(全拼是带 ' 的音节)。

§annotation: msime_engine_str

注释:辅助码或纠错提示,没有时为空串。

§corrected_from: msime_engine_str

纠错读出的行:用户实际打的字母;其余为空串。

Trait Implementations§

Source§

impl Clone for msime_engine_candidate

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 msime_engine_candidate

Source§

impl Debug for msime_engine_candidate

Source§

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

Formats the value using the given formatter. Read more

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<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.