#[repr(C, u8)]pub enum TextOperation {
InsertText(TextOpInsertText),
DeleteText(TextOpDeleteText),
ReplaceText(TextOpReplaceText),
SetSelection(TextOpSetSelection),
ExtendSelection(TextOpExtendSelection),
ClearSelection(TextOpClearSelection),
MoveCursor(TextOpMoveCursor),
Copy(TextOpCopy),
Cut(TextOpCut),
Paste(TextOpPaste),
SelectAll(TextOpSelectAll),
}Expand description
Text editing operation (what will change)
Variants§
InsertText(TextOpInsertText)
Insert text at cursor position
DeleteText(TextOpDeleteText)
Delete text in range
ReplaceText(TextOpReplaceText)
Replace text in range with new text
SetSelection(TextOpSetSelection)
Set selection to new range
ExtendSelection(TextOpExtendSelection)
Extend selection in a direction
ClearSelection(TextOpClearSelection)
Clear all selections
MoveCursor(TextOpMoveCursor)
Move cursor to new position
Copy(TextOpCopy)
Copy selection to clipboard (no text change)
Cut(TextOpCut)
Cut selection to clipboard (deletes text)
Paste(TextOpPaste)
Paste from clipboard (inserts text)
SelectAll(TextOpSelectAll)
Select all text in node
Trait Implementations§
Source§impl Clone for TextOperation
impl Clone for TextOperation
Source§fn clone(&self) -> TextOperation
fn clone(&self) -> TextOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextOperation
impl RefUnwindSafe for TextOperation
impl Send for TextOperation
impl Sync for TextOperation
impl Unpin for TextOperation
impl UnwindSafe for TextOperation
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more