pub enum Operation {
Insert {
position: Position,
text: String,
},
Delete {
range: Range,
deleted_text: String,
},
Replace {
range: Range,
old_text: String,
new_text: String,
},
Delta {
forward: ScriptDeltaOwned,
undo_data: DeltaUndoData,
},
}Expand description
Represents an operation that can be undone and redone
Variants§
Insert
Text was inserted
Delete
Text was deleted
Replace
Text was replaced
Delta
Available on crate feature
stream only.Delta was applied (for incremental updates)
Fields
§
forward: ScriptDeltaOwnedThe forward delta to apply
§
undo_data: DeltaUndoDataData needed to undo this delta
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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