Common/LanguageFeature/DTO/TextEditDTO.rs
1//! # TextEditDTO
2//!
3//! Defines the Data Transfer Object for representing a single text edit
4//! operation.
5
6use serde::{Deserialize, Serialize};
7
8use super::RangeDTO::RangeDTO;
9
10/// A serializable struct representing a text edit, analogous to
11/// `vscode.TextEdit`. It is the fundamental building block for formatting edits
12/// and workspace edits.
13#[derive(Serialize, Deserialize, Debug, Clone)]
14#[serde(rename_all = "PascalCase")]
15pub struct TextEditDTO {
16 /// The range of text to be replaced.
17 pub Range:RangeDTO,
18
19 /// The new text to be inserted.
20 pub NewText:String,
21}