pub struct Edit {
pub range: Range<usize>,
pub insert: String,
}Expand description
A single contiguous text edit: replace range (a byte range in the old text)
with insert.
Fields§
§range: Range<usize>§insert: StringImplementations§
Source§impl Edit
impl Edit
Sourcepub fn delta(&self) -> isize
pub fn delta(&self) -> isize
The signed length change this edit applies to text after range.
Diagnostic offsets at or after the edit shift by exactly this much, which is what lets a tier keep the errors it did not regenerate.
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