aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-dap/src/lib.rs')
-rw-r--r--helix-dap/src/lib.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/helix-dap/src/lib.rs b/helix-dap/src/lib.rs
new file mode 100644
index 00000000..100c0c60
--- /dev/null
+++ b/helix-dap/src/lib.rs
@@ -0,0 +1,24 @@
+mod client;
+mod transport;
+mod types;
+
+pub use client::{Client, DebuggerQuirks};
+pub use events::Event;
+pub use transport::{Payload, Response, Transport};
+pub use types::*;
+
+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>;