pub enum EditOp {
Insert {
at: Position,
text: String,
},
Delete {
range: Range,
},
Replace {
range: Range,
text: String,
},
}Expand description
A single, atomic edit on a buffer.
All positions and ranges are raw source-rope UTF-8 byte coordinates. Display-map adjusted coordinates must be converted before constructing an edit.
Variants§
Insert
Insert text at position at.
Delete
Delete the bytes covered by range.
Replace
Replace the bytes covered by range with text.
Implementations§
Trait Implementations§
impl Eq for EditOp
impl StructuralPartialEq for EditOp
Auto Trait Implementations§
impl Forget for EditOp
impl Freeze for EditOp
impl Move for EditOp
impl RefUnwindSafe for EditOp
impl Send for EditOp
impl Sync for EditOp
impl Unpin for EditOp
impl UnsafeUnpin for EditOp
impl UnwindSafe for EditOp
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