1pub mod client;
2pub mod connector;
3pub mod core;
4
5pub use client::Client;
6pub use connector::Speaker;
7
8pub use connector::subscribe;
9
10pub type LCResult<T> = Result<T, Error>;
11
12#[derive(Debug, thiserror::Error)]
13pub enum Error {
14 #[error("unknown")]
15 Unknown,
16 #[error("league of legends is not running")]
17 AppNotRunning,
18 #[error("failed to create the client: {0}")]
19 HttpClientCreation(String),
20 #[error("failed to create the client: {0}")]
21 Websocket(String),
22 #[error("failed to make a request: {0}")]
23 WebsocketRequest(String),
24 #[error("failed to connect to stream: {0}")]
25 Stream(#[from] std::io::Error),
26 #[error("tls stream failure: {0}")]
27 Tls(#[from] native_tls::Error),
28 #[error("failed to send message")]
29 SendErr,
30 #[error("websocket connection error: {0}")]
31 Tungstenite(#[from] tungstenite::error::Error),
32}