pub struct ImeEditorState {
pub text: String,
pub selection_start: usize,
pub selection_end: usize,
pub composition: Option<(usize, usize)>,
pub single_line: bool,
}Expand description
Snapshot of the focused text field’s editable state for platform IMEs.
All offsets are UTF-8 byte offsets into text. Platform layers that talk
to UTF-16 based IMEs (Android’s InputConnection, web composition events)
convert on their side of the boundary.
Fields§
§text: StringFull text content of the field.
selection_start: usizeSelection start (min) in bytes. Equal to selection_end for a caret.
selection_end: usizeSelection end (max) in bytes.
composition: Option<(usize, usize)>Active composing (preedit) region in bytes, if any.
single_line: boolWhether the field is single-line (platforms use this to pick the
keyboard action, e.g. Android IME_ACTION_DONE vs newline).
Trait Implementations§
Source§impl Clone for ImeEditorState
impl Clone for ImeEditorState
Source§fn clone(&self) -> ImeEditorState
fn clone(&self) -> ImeEditorState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImeEditorState
impl Debug for ImeEditorState
impl Eq for ImeEditorState
Source§impl PartialEq for ImeEditorState
impl PartialEq for ImeEditorState
impl StructuralPartialEq for ImeEditorState
Auto Trait Implementations§
impl Freeze for ImeEditorState
impl RefUnwindSafe for ImeEditorState
impl Send for ImeEditorState
impl Sync for ImeEditorState
impl Unpin for ImeEditorState
impl UnsafeUnpin for ImeEditorState
impl UnwindSafe for ImeEditorState
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