Mountain/ApplicationState/DTO/
RPCModelContentChangeDTO.rs

1//! # RPCModelContentChangeDTO
2//!
3//! Defines the Data Transfer Objects for representing text changes in a
4//! document, compatible with VS Code's RPC protocol for text synchronization.
5
6#![allow(non_snake_case, non_camel_case_types)]
7
8use serde::Deserialize;
9
10/// Represents a line and column-based range in a text document.
11#[derive(Deserialize, Debug, Clone)]
12#[serde(rename_all = "PascalCase")]
13pub struct RPCRangeDTO {
14	pub StartLineNumber:usize,
15
16	pub StartColumn:usize,
17
18	pub EndLineNumber:usize,
19
20	pub EndColumn:usize,
21}
22
23/// Represents a single text change operation, including the range to be
24/// replaced and the new text to insert. This is part of a collection sent when
25/// a document is edited.
26#[derive(Deserialize, Debug, Clone)]
27#[serde(rename_all = "PascalCase")]
28pub struct RPCModelContentChangeDTO {
29	pub Range:RPCRangeDTO,
30
31	pub Text:String,
32}