pub struct TextDocumentEdit {
pub text_document: OptionalVersionedTextDocumentIdentifier,
pub edits: Vec<Edit>,
}Expand description
Describes textual changes on a text document. A TextDocumentEdit describes all changes on a document version Si and after they are applied move the document to version Si+1. So the creator of a TextDocumentEdit doesn’t need to sort the array of edits or do any kind of ordering. However the edits must be non overlapping.
Fields§
§text_document: OptionalVersionedTextDocumentIdentifierThe text document to change.
edits: Vec<Edit>The edits to be applied.
@since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a client capability.
@since 3.18.0 - support for SnippetTextEdit. This is guarded using a client capability.
Implementations§
Source§impl TextDocumentEdit
impl TextDocumentEdit
pub const fn new( text_document: OptionalVersionedTextDocumentIdentifier, edits: Vec<Edit>, ) -> Self
Trait Implementations§
Source§impl Clone for TextDocumentEdit
impl Clone for TextDocumentEdit
Source§fn clone(&self) -> TextDocumentEdit
fn clone(&self) -> TextDocumentEdit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextDocumentEdit
impl Debug for TextDocumentEdit
Source§impl<'de> Deserialize<'de> for TextDocumentEdit
impl<'de> Deserialize<'de> for TextDocumentEdit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<TextDocumentEdit> for DocumentChange
impl From<TextDocumentEdit> for DocumentChange
Source§fn from(v: TextDocumentEdit) -> Self
fn from(v: TextDocumentEdit) -> Self
Converts to this type from the input type.
Source§impl Hash for TextDocumentEdit
impl Hash for TextDocumentEdit
Source§impl PartialEq for TextDocumentEdit
impl PartialEq for TextDocumentEdit
Source§fn eq(&self, other: &TextDocumentEdit) -> bool
fn eq(&self, other: &TextDocumentEdit) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TextDocumentEdit
impl Serialize for TextDocumentEdit
impl Eq for TextDocumentEdit
impl StructuralPartialEq for TextDocumentEdit
Auto Trait Implementations§
impl Freeze for TextDocumentEdit
impl RefUnwindSafe for TextDocumentEdit
impl Send for TextDocumentEdit
impl Sync for TextDocumentEdit
impl Unpin for TextDocumentEdit
impl UnsafeUnpin for TextDocumentEdit
impl UnwindSafe for TextDocumentEdit
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