pub struct Edit {
pub range: Range<usize>,
pub insert: String,
}Expand description
A text edit expressed in character indices within the buffer.
The range is half-open: [start, end).
- To represent an insertion, use an empty range:
start == end. - To represent a deletion, use an empty
insertstring. - To represent a replacement, set both a non-empty range and insert text.
Fields§
§range: Range<usize>§insert: StringImplementations§
Trait Implementations§
impl Eq for Edit
impl StructuralPartialEq for Edit
Auto Trait Implementations§
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl Send for Edit
impl Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
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