aboutsummaryrefslogtreecommitdiff
path: root/crates/gen_lsp_server/src/msg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/gen_lsp_server/src/msg.rs')
-rw-r--r--crates/gen_lsp_server/src/msg.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/gen_lsp_server/src/msg.rs b/crates/gen_lsp_server/src/msg.rs
index 02c7a1858..1d39ba4bc 100644
--- a/crates/gen_lsp_server/src/msg.rs
+++ b/crates/gen_lsp_server/src/msg.rs
@@ -15,6 +15,24 @@ pub enum RawMessage {
15 Response(RawResponse), 15 Response(RawResponse),
16} 16}
17 17
18impl From<RawRequest> for RawMessage {
19 fn from(raw: RawRequest) -> RawMessage {
20 RawMessage::Request(raw)
21 }
22}
23
24impl From<RawNotification> for RawMessage {
25 fn from(raw: RawNotification) -> RawMessage {
26 RawMessage::Notification(raw)
27 }
28}
29
30impl From<RawResponse> for RawMessage {
31 fn from(raw: RawResponse) -> RawMessage {
32 RawMessage::Response(raw)
33 }
34}
35
18#[derive(Debug, Serialize, Deserialize, Clone)] 36#[derive(Debug, Serialize, Deserialize, Clone)]
19pub struct RawRequest { 37pub struct RawRequest {
20 pub id: u64, 38 pub id: u64,