#[non_exhaustive]pub enum Ime<'a> {
Enabled,
Preedit {
text: &'a str,
cursor: Option<(usize, usize)>,
},
Commit(&'a str),
Disabled,
}Expand description
Input method events: text being composed (preedit) and text committed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Enabled
The input method became active.
Preedit
Text being composed, not yet part of the document; cursor is a byte range within it.
Empty text ends the composition.
Fields
Commit(&'a str)
Text to insert, replacing any composition.
Disabled
The input method became inactive.
Trait Implementations§
impl<'a> Copy for Ime<'a>
impl<'a> Eq for Ime<'a>
impl<'a> StructuralPartialEq for Ime<'a>
Auto Trait Implementations§
impl<'a> Freeze for Ime<'a>
impl<'a> RefUnwindSafe for Ime<'a>
impl<'a> Send for Ime<'a>
impl<'a> Sync for Ime<'a>
impl<'a> Unpin for Ime<'a>
impl<'a> UnsafeUnpin for Ime<'a>
impl<'a> UnwindSafe for Ime<'a>
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