pub struct Edit {
pub cursor: usize,
pub anchor: Option<usize>,
pub composing: Option<(usize, usize)>,
}Expand description
Edit state of an input field: cursor + selection anchor.
Indices are in characters. They may exceed the value’s length (e.g.
usize::MAX for “the end”): widgets clamp them at use.
Fields§
§cursor: usizeCursor position.
anchor: Option<usize>Selection anchor (None = no selection).
composing: Option<(usize, usize)>Range (start, end) being composed by the IME (provisional text,
underlined on screen); None outside composition. In character indices.
Implementations§
Trait Implementations§
impl Copy for Edit
impl Eq for Edit
impl StructuralPartialEq for Edit
Auto Trait Implementations§
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl Send for Edit
impl Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
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