pub enum EditCmd {
InsertText {
text: String,
},
DeleteBackward,
DeleteForward,
MoveCaretLeft,
MoveCaretRight,
SelectAll,
SetSelection {
selection: Selection,
},
}Expand description
Legacy backend-neutral editing command.
The enum carries intent only and performs no mutation by itself. New editing
integrations can use ailloli_ui_text::TextEditAction for grapheme-, IME-,
undo-, and clipboard-aware behavior.
§Examples
use ailloli_ui_runtime::input::EditCmd;
assert_eq!(EditCmd::InsertText { text: "x".into() }, EditCmd::InsertText { text: "x".into() });Variants§
InsertText
Insert the exact owned UTF-8 payload.
Interpretation of newlines and empty strings belongs to the consumer.
DeleteBackward
Delete before the caret using the consumer’s boundary policy.
DeleteForward
Delete after the caret using the consumer’s boundary policy.
MoveCaretLeft
Move left using the consumer’s character/grapheme policy.
MoveCaretRight
Move right using the consumer’s character/grapheme policy.
SelectAll
Select the consumer’s complete editable range.
SetSelection
Install an explicit, otherwise unvalidated byte selection.
Trait Implementations§
impl StructuralPartialEq for EditCmd
Auto Trait Implementations§
impl Freeze for EditCmd
impl RefUnwindSafe for EditCmd
impl Send for EditCmd
impl Sync for EditCmd
impl Unpin for EditCmd
impl UnwindSafe for EditCmd
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.