Mountain/ApplicationState/DTO/ProviderRegistrationDTO.rs
1//! # ProviderRegistrationDTO
2//!
3//! Defines the Data Transfer Object for storing the state of a registered
4//! language feature provider.
5
6#![allow(non_snake_case, non_camel_case_types)]
7
8use Common::LanguageFeature::DTO::ProviderType::ProviderType;
9use serde::{Deserialize, Serialize};
10use serde_json::Value;
11
12/// Stores the registration details for a single language feature provider
13/// contributed by an extension. This is stored in `ApplicationState` to track
14/// all active providers.
15#[derive(Serialize, Deserialize, Debug, Clone)]
16#[serde(rename_all = "PascalCase")]
17pub struct ProviderRegistrationDTO {
18 /// A unique handle for this registration, generated by Mountain.
19 pub Handle:u32,
20
21 /// The type of feature this provider implements.
22 pub ProviderType:ProviderType,
23
24 /// The document selector (serialized as a `Value`) that determines which
25 /// documents this provider applies to.
26 pub Selector:Value,
27
28 /// The identifier of the sidecar process that hosts this provider's logic.
29 pub SideCarIdentifier:String,
30
31 /// The identifier of the extension that contributed this provider.
32 pub ExtensionIdentifier:Value,
33
34 /// Optional, feature-specific options for this provider.
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub Options:Option<Value /* ProviderOptionsDTO */>,
37}