Common/Configuration/DTO/InspectResultDataDTO.rs
1//! # InspectResultDataDTO
2//!
3//! Defines the Data Transfer Object for the result of inspecting a
4//! configuration key across all possible scopes.
5
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9/// A serializable struct that represents the detailed breakdown of a
10/// configuration value from all possible sources.
11///
12/// This DTO is returned by the `InspectConfiguration` effect and is used by
13/// UI components like the Settings editor to show where values are inherited
14/// from, what the default is, and what the final effective value is.
15#[derive(Serialize, Deserialize, Debug, Clone, Default)]
16#[serde(rename_all = "PascalCase")]
17pub struct InspectResultDataDTO {
18 /// The value from the default configuration.
19 pub DefaultValue:Option<Value>,
20
21 /// The value from the user (global) settings.
22 pub UserValue:Option<Value>,
23
24 /// The value from the local (un-synced) user settings.
25 pub UserLocalValue:Option<Value>,
26
27 /// The value from the remote user settings (if applicable).
28 pub UserRemoteValue:Option<Value>,
29
30 /// The value from the workspace settings.
31 pub WorkSpaceValue:Option<Value>,
32
33 /// The value from a specific workspace folder's settings.
34 pub WorkSpaceFolderValue:Option<Value>,
35
36 /// The value from the in-memory configuration.
37 pub MemoryValue:Option<Value>,
38
39 /// The value from the policy-enforced configuration.
40 pub PolicyValue:Option<Value>,
41
42 /// The final, effective value after all scopes have been merged.
43 pub EffectiveValue:Option<Value>,
44
45 // --- Language-Specific Overrides ---
46 pub DefaultLanguageValue:Option<Value>,
47
48 pub UserLanguageValue:Option<Value>,
49
50 pub UserLocalLanguageValue:Option<Value>,
51
52 pub UserRemoteLanguageValue:Option<Value>,
53
54 pub WorkSpaceLanguageValue:Option<Value>,
55
56 pub WorkSpaceFolderLanguageValue:Option<Value>,
57
58 pub MemoryLanguageValue:Option<Value>,
59
60 pub PolicyLanguageValue:Option<Value>,
61
62 /// A list of language identifiers for which language-specific values were
63 /// found during the inspection.
64 #[serde(skip_serializing_if = "Option::is_none")]
65 pub LanguageIdentifiers:Option<Vec<String>>,
66}