pub struct TextChange {
pub range: Option<Range<Pos>>,
pub patch: String,
}
Expand description
Native representation of a change that replaces a part of the target text.
Can be converted to and from lsp_types::TextDocumentContentChangeEvent
by
TextAdapter
.
Fields§
§range: Option<Range<Pos>>
Specifies the part of the text that needs to be replaced. When None
the
whole text needs to be replaced.
patch: String
The replacement text.
Auto Trait Implementations§
impl Freeze for TextChange
impl RefUnwindSafe for TextChange
impl Send for TextChange
impl Sync for TextChange
impl Unpin for TextChange
impl UnwindSafe for TextChange
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