pub struct TextEdit {
pub range: Range,
pub new_text: String,
}
Expand description
A textual edit applicable to a text document.
If n TextEdit
s are applied to a text document all text edits describe changes to the initial document version.
Execution wise text edits should applied from the bottom to the top of the text document. Overlapping text edits
are not supported.
Fields§
§range: Range
The range of the text document to be manipulated. To insert text into a document create a range where start === end.
new_text: String
The string to be inserted. For delete operations use an empty string.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for TextEdit
impl<'de> Deserialize<'de> for TextEdit
§fn deserialize<__D>(
__deserializer: __D
) -> Result<TextEdit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<TextEdit, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<TextEdit> for CompletionTextEdit
impl From<TextEdit> for CompletionTextEdit
§fn from(edit: TextEdit) -> CompletionTextEdit
fn from(edit: TextEdit) -> CompletionTextEdit
Converts to this type from the input type.
§impl Serialize for TextEdit
impl Serialize for TextEdit
§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 TextEdit
impl StructuralEq for TextEdit
impl StructuralPartialEq for TextEdit
Auto Trait Implementations§
impl RefUnwindSafe for TextEdit
impl Send for TextEdit
impl Sync for TextEdit
impl Unpin 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
§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.