mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
577 B
Rust
25 lines
577 B
Rust
mod client;
|
|
mod transport;
|
|
mod types;
|
|
|
|
pub use client::Client;
|
|
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>;
|