pub enum EditOperation {
Insert {
pos: CursorPosition,
text: String,
},
Delete {
pos: CursorPosition,
text: String,
},
Replace {
pos: CursorPosition,
old_text: String,
new_text: String,
},
}Expand description
A single text editing operation that can be undone and redone.
Variants§
Insert
Text was inserted at a position.
Fields
§
pos: CursorPositionPosition where text was inserted.
Delete
Text was deleted from a position.
Replace
Text was replaced at a position.
Implementations§
Source§impl EditOperation
impl EditOperation
Trait Implementations§
Source§impl Clone for EditOperation
impl Clone for EditOperation
Source§fn clone(&self) -> EditOperation
fn clone(&self) -> EditOperation
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 moreSource§impl Debug for EditOperation
impl Debug for EditOperation
Source§impl PartialEq for EditOperation
impl PartialEq for EditOperation
impl Eq for EditOperation
impl StructuralPartialEq for EditOperation
Auto Trait Implementations§
impl Freeze for EditOperation
impl RefUnwindSafe for EditOperation
impl Send for EditOperation
impl Sync for EditOperation
impl Unpin for EditOperation
impl UnwindSafe for EditOperation
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