Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-dap/src/types.rs')
| -rw-r--r-- | helix-dap/src/types.rs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs index 67f4937f..fdfc211a 100644 --- a/helix-dap/src/types.rs +++ b/helix-dap/src/types.rs @@ -438,6 +438,21 @@ pub mod requests { const COMMAND: &'static str = "disconnect"; } + #[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct TerminateArguments { + pub restart: Option<bool>, + } + + #[derive(Debug)] + pub enum Terminate {} + + impl Request for Terminate { + type Arguments = Option<TerminateArguments>; + type Result = (); + const COMMAND: &'static str = "terminate"; + } + #[derive(Debug)] pub enum ConfigurationDone {} @@ -752,6 +767,21 @@ pub mod requests { type Result = RunInTerminalResponse; const COMMAND: &'static str = "runInTerminal"; } + #[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct StartDebuggingArguments { + pub request: ConnectionType, + pub configuration: Value, + } + + #[derive(Debug)] + pub enum StartDebugging {} + + impl Request for StartDebugging { + type Arguments = StartDebuggingArguments; + type Result = (); + const COMMAND: &'static str = "startDebugging"; + } } // Events @@ -992,6 +1022,13 @@ pub mod events { } } +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum ConnectionType { + Launch, + Attach, +} + #[test] fn test_deserialize_module_id_from_number() { let raw = r#"{"id": 0, "name": "Name"}"#; |