pub struct ImeState {
pub mode: ImeMode,
pub dictionary: BTreeMap<String, Vec<DictEntry>>,
pub dict_loaded: bool,
pub composing: bool,
pub romaji_buf: String,
pub kana_buf: String,
pub converting: bool,
pub candidates: Vec<String>,
pub selected_idx: usize,
}Fields§
§mode: ImeMode§dictionary: BTreeMap<String, Vec<DictEntry>>§dict_loaded: bool§composing: bool§romaji_buf: String§kana_buf: String§converting: bool§candidates: Vec<String>§selected_idx: usizeImplementations§
Source§impl ImeState
impl ImeState
pub const fn new() -> Self
pub fn load_dict(&mut self)
pub fn toggle_mode(&mut self, to_japanese: bool)
pub fn clear(&mut self)
pub fn input_char(&mut self, c: char)
pub fn backspace(&mut self)
fn convert_romaji(&mut self)
fn flush_pending_romaji(&mut self)
pub fn handle_space(&mut self) -> bool
fn build_conversion_candidates(&mut self)
pub fn handle_enter(&mut self) -> Option<String>
Sourcepub fn select_candidate_by_number(&mut self, n: usize) -> Option<String>
pub fn select_candidate_by_number(&mut self, n: usize) -> Option<String>
数字キー(1〜9)で候補を直接選択して確定。確定テキストを返す。
pub fn get_display_text(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImeState
impl RefUnwindSafe for ImeState
impl Send for ImeState
impl Sync for ImeState
impl Unpin for ImeState
impl UnsafeUnpin for ImeState
impl UnwindSafe for ImeState
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
Mutably borrows from an owned value. Read more