1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pub mod client;
pub mod packet;
mod transport;
pub use crate::client::Client;
pub use async_trait::async_trait;
pub use serde_json::json;
pub type CometResult<T> = Result<T, CometError>;
#[derive(Debug, thiserror::Error)]
pub enum CometError {
#[error("{0}")]
Ws(#[from] tungstenite::Error),
#[error("{0}")]
Json(#[from] serde_json::Error),
#[error("{0}")]
Io(#[from] std::io::Error),
#[error("the client is shutting down")]
ClientExited,
#[error("missing client id")]
MissingClientId,
}