#[cfg(feature = "client-hyper")]
#[cfg_attr(docsrs, doc(cfg(feature = "client-hyper")))]
pub mod hyper;
use crate::error::BoxError as BodyError;
use bytes::Bytes;
use http_body_util::combinators::BoxBody;
#[cfg(feature = "client-hyper")]
#[cfg_attr(docsrs, doc(cfg(feature = "client-hyper")))]
pub use hyper::*;
#[macro_export]
macro_rules! shared_client {
($v:vis $getter: ident: $maker: ident -> $ClientType: ty) => {
$v fn $getter() -> $ClientType {
static mut CLIENT: std::sync::OnceLock<$ClientType> = std::sync::OnceLock::new();
unsafe {
CLIENT.get_or_init($maker).clone()
}
}
};
}
pub type ClientBody = BoxBody<Bytes, BodyError>;