1#[cfg(feature = "client-hyper")]
10#[cfg_attr(docsrs, doc(cfg(feature = "client-hyper")))]
11pub mod hyper;
12use crate::error::BoxError as BodyError;
13use bytes::Bytes;
14use http_body_util::combinators::BoxBody;
15#[cfg(feature = "client-hyper")]
16#[cfg_attr(docsrs, doc(cfg(feature = "client-hyper")))]
17pub use hyper::*;
18
19#[macro_export]
20macro_rules! shared_client {
21 ($v:vis $getter: ident: $maker: ident -> $ClientType: ty) => {
22 $v fn $getter() -> $ClientType {
23 static mut CLIENT: std::sync::OnceLock<$ClientType> = std::sync::OnceLock::new();
24 unsafe {
25 CLIENT.get_or_init($maker).clone()
26 }
27 }
28 };
29}
30
31pub type ClientBody = BoxBody<Bytes, BodyError>;