diff options
author | Aleksey Kladov <[email protected]> | 2019-03-05 13:24:59 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-05 13:33:05 +0000 |
commit | 73b892aaa3f889e987b6115d76a6e41df6c478e1 (patch) | |
tree | 3f993ce8e09c703b417c68eaf3b7f26863982535 /crates/gen_lsp_server/src | |
parent | e7241274ef052fc3081b6dbc2e80266d6703c80c (diff) |
show message in client's UI if workspace fails to load
Diffstat (limited to 'crates/gen_lsp_server/src')
-rw-r--r-- | crates/gen_lsp_server/src/msg.rs | 18 |
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 | ||
18 | impl From<RawRequest> for RawMessage { | ||
19 | fn from(raw: RawRequest) -> RawMessage { | ||
20 | RawMessage::Request(raw) | ||
21 | } | ||
22 | } | ||
23 | |||
24 | impl From<RawNotification> for RawMessage { | ||
25 | fn from(raw: RawNotification) -> RawMessage { | ||
26 | RawMessage::Notification(raw) | ||
27 | } | ||
28 | } | ||
29 | |||
30 | impl 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)] |
19 | pub struct RawRequest { | 37 | pub struct RawRequest { |
20 | pub id: u64, | 38 | pub id: u64, |