pub struct TextEdit {
pub range: Range<usize>,
pub new_text: String,
pub old_text: String,
}Expand description
A single atomic text edit expressed as a byte-range replacement.
Fields§
§range: Range<usize>Byte range in the document before this edit is applied.
new_text: StringThe text that replaces range.
old_text: StringThe text that was present in range before the edit (stored so we can
invert the operation for undo).
Implementations§
Trait Implementations§
impl Eq for TextEdit
impl StructuralPartialEq for TextEdit
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