From 09390be6a568bcf7052c57bf10219c448413d5b0 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 14 Aug 2021 09:14:05 +0300 Subject: dap-basic: handle output events --- helix-dap/src/client.rs | 13 +++++++++++++ helix-dap/src/lib.rs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'helix-dap/src') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 7ce7833d..ef7bb153 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -254,6 +254,19 @@ struct VariablesResponseBody { variables: Vec, } +#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct OutputEventBody { + pub output: String, + pub category: Option, + pub group: Option, + pub line: Option, + pub column: Option, + pub variables_reference: Option, + pub source: Option, + pub data: Option, +} + #[derive(Debug)] pub struct Client { id: usize, diff --git a/helix-dap/src/lib.rs b/helix-dap/src/lib.rs index 1e545fd8..408f4d3d 100644 --- a/helix-dap/src/lib.rs +++ b/helix-dap/src/lib.rs @@ -1,7 +1,7 @@ mod client; mod transport; -pub use client::{Breakpoint, Client, SourceBreakpoint}; +pub use client::{Breakpoint, Client, OutputEventBody, SourceBreakpoint}; pub use transport::{Event, Payload, Request, Response, Transport}; use thiserror::Error; -- cgit v1.2.3-70-g09d2