pub struct TextEdit {
pub range: Range<usize>,
pub replacement: String,
}Expand description
A single deterministic edit to a document’s raw text.
Ranges are byte offsets into ParsedDocument::raw. Multiple TextEdits
against one file must not overlap; the fix pipeline sorts descending by
range.start and refuses to apply a fileset whose edits collide.
Fields§
§range: Range<usize>Byte range in the original document to replace.
replacement: StringReplacement text; may be empty to delete the range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextEdit
impl RefUnwindSafe for TextEdit
impl Send for TextEdit
impl Sync for TextEdit
impl Unpin for TextEdit
impl UnsafeUnpin for TextEdit
impl UnwindSafe for TextEdit
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