on 2158366 help sign in
24 lines 577 B history raw
1mod client;
2mod transport;
3mod types;
5pub use client::Client;
6pub use events::Event;
7pub use transport::{Payload, Response, Transport};
8pub use types::*;
10use thiserror::Error;
11#[derive(Error, Debug)]
12pub enum Error {
13 #[error("failed to parse: {0}")]
14 Parse(#[from] serde_json::Error),
15 #[error("IO Error: {0}")]
16 IO(#[from] std::io::Error),
17 #[error("request timed out")]
18 Timeout,
19 #[error("server closed the stream")]
20 StreamClosed,
21 #[error(transparent)]
22 Other(#[from] anyhow::Error),
24pub type Result<T> = core::result::Result<T, Error>;