pub enum Modification {
Insert {
start: (u32, u32),
text: String,
start_byte: usize,
},
Delete {
start: (u32, u32),
end: (u32, u32),
text: String,
start_byte: usize,
},
Replace {
start: (u32, u32),
end: (u32, u32),
old_text: String,
new_text: String,
start_byte: usize,
},
FullReplace,
}Expand description
Type of buffer modification.
Describes what kind of change was made to the buffer.
Variants§
Insert
Text was inserted at a position.
Fields
Delete
Text was deleted from a range.
Fields
Replace
Text was replaced (delete + insert combined).
Fields
FullReplace
Entire buffer content was replaced (e.g., file reload).
Trait Implementations§
Source§impl Clone for Modification
impl Clone for Modification
Source§fn clone(&self) -> Modification
fn clone(&self) -> Modification
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 Modification
impl Debug for Modification
Source§impl PartialEq for Modification
impl PartialEq for Modification
impl Eq for Modification
impl StructuralPartialEq for Modification
Auto Trait Implementations§
impl Freeze for Modification
impl RefUnwindSafe for Modification
impl Send for Modification
impl Sync for Modification
impl Unpin for Modification
impl UnsafeUnpin for Modification
impl UnwindSafe for Modification
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