Struct lsp2::TextDocumentEdit
pub struct TextDocumentEdit {
pub text_document: OptionalVersionedTextDocumentIdentifier,
pub edits: Vec<OneOf<TextEdit, AnnotatedTextEdit>, Global>,
}
Expand description
Describes textual changes on a single text document. The text document is referred to as a
OptionalVersionedTextDocumentIdentifier
to allow clients to check the text document version before an
edit is applied. A TextDocumentEdit
describes all changes on a 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 or do any kind of ordering. However the edits must be non overlapping.
Fields§
§text_document: OptionalVersionedTextDocumentIdentifier
The text document to change.
edits: Vec<OneOf<TextEdit, AnnotatedTextEdit>, Global>
The edits to be applied.
@since 3.16.0 - support for AnnotatedTextEdit. This is guarded by the
client capability workspace.workspaceEdit.changeAnnotationSupport
Trait Implementations§
§impl Clone for TextDocumentEdit
impl Clone for TextDocumentEdit
§fn clone(&self) -> TextDocumentEdit
fn clone(&self) -> TextDocumentEdit
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for TextDocumentEdit
impl Debug for TextDocumentEdit
§impl<'de> Deserialize<'de> for TextDocumentEdit
impl<'de> Deserialize<'de> for TextDocumentEdit
§fn deserialize<__D>(
__deserializer: __D
) -> Result<TextDocumentEdit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<TextDocumentEdit, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<TextDocumentEdit> for TextDocumentEdit
impl PartialEq<TextDocumentEdit> for TextDocumentEdit
§fn eq(&self, other: &TextDocumentEdit) -> bool
fn eq(&self, other: &TextDocumentEdit) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for TextDocumentEdit
impl Serialize for TextDocumentEdit
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for TextDocumentEdit
impl StructuralEq for TextDocumentEdit
impl StructuralPartialEq for TextDocumentEdit
Auto Trait Implementations§
impl RefUnwindSafe for TextDocumentEdit
impl Send for TextDocumentEdit
impl Sync for TextDocumentEdit
impl Unpin 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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.