diff options
author | Dmitry Sharshakov | 2021-08-12 13:35:15 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-08-20 04:43:54 +0000 |
commit | 0f6e81b85be6e7e8f08446f3cd373da38dd67360 (patch) | |
tree | 7f79b7017ed700652f2dee868c88d084c5d0be4d /helix-dap/src/lib.rs | |
parent | d4c17b633c09ab2a0ba8794a6650dcfb67f50ea9 (diff) |
Initial debug adapter protocol implementation
Diffstat (limited to 'helix-dap/src/lib.rs')
-rw-r--r-- | helix-dap/src/lib.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/helix-dap/src/lib.rs b/helix-dap/src/lib.rs new file mode 100644 index 00000000..1e545fd8 --- /dev/null +++ b/helix-dap/src/lib.rs @@ -0,0 +1,21 @@ +mod client; +mod transport; + +pub use client::{Breakpoint, Client, SourceBreakpoint}; +pub use transport::{Event, Payload, Request, Response, Transport}; + +use thiserror::Error; +#[derive(Error, Debug)] +pub enum Error { + #[error("failed to parse: {0}")] + Parse(#[from] serde_json::Error), + #[error("IO Error: {0}")] + IO(#[from] std::io::Error), + #[error("request timed out")] + Timeout, + #[error("server closed the stream")] + StreamClosed, + #[error(transparent)] + Other(#[from] anyhow::Error), +} +pub type Result<T> = core::result::Result<T, Error>; |