Common/LanguageFeature/DTO/LocationDTO.rs
1//! # LocationDTO
2//!
3//! Defines the Data Transfer Object for representing a location, which includes
4//! a URI and a range within that resource.
5
6use serde::{Deserialize, Serialize};
7use url::Url;
8
9use super::RangeDTO::RangeDTO;
10use crate::Utility::Serialization::URLSerializationHelper;
11
12/// A serializable struct representing a location, analogous to
13/// `vscode.Location`. It is a core building block for features like "Go to
14/// Definition" and "Find All References".
15#[derive(Serialize, Deserialize, Debug, Clone)]
16#[serde(rename_all = "PascalCase")]
17pub struct LocationDTO {
18 /// The URI of the resource.
19 #[serde(with = "URLSerializationHelper")]
20 pub Uri:Url,
21
22 /// The range within the resource.
23 pub Range:RangeDTO,
24}