aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src/lib.rs
blob: 408f4d3d91b1bf4d0685d0f571c05c4390ce779c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mod client;
mod transport;

pub use client::{Breakpoint, Client, OutputEventBody, 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>;