#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]
pub use builder::Builder;
pub use client::Client;
pub(crate) use config::Config;
mod builder;
mod client;
mod config;
mod error;
pub mod lang;
pub mod types {
pub use super::error::{ErrorKind, ErrorResponse};
}
#[must_use]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("http error: {0}")]
Http(#[from] reqwest::Error),
#[cfg(feature = "streaming")]
#[cfg_attr(docsrs, doc(cfg(feature = "streaming")))]
#[error("websocket error: {0}")]
Ws(#[from] reqwest_websocket::Error),
#[error("api error: {0}")]
Api(#[from] types::ErrorResponse),
}
pub type Result<T, E = Error> = std::result::Result<T, E>;