pub struct Edit {
pub start_byte: usize,
pub old_end_byte: usize,
pub new_end_byte: usize,
pub new_text: String,
}Expand description
Core incremental parsing types: edit representation, state, and application. Incremental parsing implementation and helpers. Edit description
Fields§
§start_byte: usize§old_end_byte: usize§new_end_byte: usize§new_text: StringImplementations§
Source§impl Edit
impl Edit
Sourcepub fn from_lsp_change(
change: &TextDocumentContentChangeEvent,
line_index: &LineIndex,
old_text: &str,
) -> Option<Edit>
pub fn from_lsp_change( change: &TextDocumentContentChangeEvent, line_index: &LineIndex, old_text: &str, ) -> Option<Edit>
Convert LSP change to Edit
Trait Implementations§
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