pub mod error;
pub mod support;
pub mod traits;
cfg_if::cfg_if! {
if #[cfg(feature = "eyre")]{
pub type AnyError = eyre::Report;
}else if #[cfg(feature = "anyhow")]{
pub type AnyError = anyhow::Error;
}else{
pub type AnyError = BoxError;
}
}
pub type BoxError = Box<dyn std::error::Error + Send + Sync>;
pub type BoxFuture<'a, T = ()> =
std::pin::Pin<Box<dyn std::future::Future<Output = T> + Send + 'a>>;
pub type BoxClosure<T = ()> = Box<dyn Fn() -> T + Send + Sync>;
pub type BoxCallback<P = (), R = ()> = Box<dyn Fn(P) -> R + Send + Sync>;
pub type Closure<T = ()> = std::sync::Arc<dyn Fn() -> T + Send + Sync>;
pub type Callback<P = (), R = ()> = std::sync::Arc<dyn Fn(P) -> R + Send + Sync>;
pub type Instance = std::sync::Arc<dyn std::any::Any + Send + Sync>;
pub type Result<T, E = AnyError> = std::result::Result<T, E>;
pub type SharedString = std::borrow::Cow<'static, str>;
pub use async_trait::async_trait;
pub use cfg_if::cfg_if;