#[cfg(all(not(target_arch = "wasm32"), feature = "hyper-backend"))]
mod hyper;
#[cfg(all(not(target_arch = "wasm32"), feature = "hyper-backend"))]
pub use hyper::HyperBackend;
#[cfg(all(not(target_arch = "wasm32"), feature = "curl-backend"))]
mod curl;
#[cfg(all(not(target_arch = "wasm32"), feature = "curl-backend"))]
pub use curl::CurlBackend;
#[cfg(all(target_vendor = "apple", feature = "apple-backend"))]
mod apple;
#[cfg(all(target_vendor = "apple", feature = "apple-backend"))]
pub use apple::AppleBackend;
#[cfg(all(not(target_arch = "wasm32"), feature = "hyper-backend"))]
pub type DefaultBackend = HyperBackend;
#[cfg(all(
not(target_arch = "wasm32"),
target_vendor = "apple",
feature = "apple-backend",
not(feature = "hyper-backend")
))]
pub type DefaultBackend = AppleBackend;
#[cfg(all(
not(target_arch = "wasm32"),
not(feature = "hyper-backend"),
not(all(target_vendor = "apple", feature = "apple-backend")),
feature = "curl-backend"
))]
pub type DefaultBackend = CurlBackend;
#[cfg(target_arch = "wasm32")]
mod web;
#[cfg(target_arch = "wasm32")]
pub use web::WebBackend;
#[cfg(target_arch = "wasm32")]
pub type DefaultBackend = WebBackend;
#[cfg(all(
not(target_arch = "wasm32"),
not(all(target_vendor = "apple", feature = "apple-backend")),
not(feature = "hyper-backend"),
not(feature = "curl-backend")
))]
compile_error!(
"No backend enabled for native platform. \
Please enable one of: `hyper-backend` (recommended), `curl-backend`, or `apple-backend` (Apple platforms only). \
The default feature set includes `hyper-backend` with `rustls` TLS."
);
#[cfg(all(target_arch = "wasm32", feature = "hyper-native-tls"))]
compile_error!(
"Backend selection is not allowed on wasm32 targets. \
The web backend using the browser's Fetch API is always used automatically. \
Please remove the `hyper-native-tls` feature when targeting wasm32."
);
#[cfg(all(target_arch = "wasm32", feature = "hyper-rustls"))]
compile_error!(
"Backend selection is not allowed on wasm32 targets. \
The web backend using the browser's Fetch API is always used automatically. \
Please remove the `hyper-rustls` feature when targeting wasm32."
);
#[cfg(all(target_arch = "wasm32", feature = "apple-backend"))]
compile_error!(
"Backend selection is not allowed on wasm32 targets. \
The web backend using the browser's Fetch API is always used automatically. \
Please remove the `apple-backend` feature when targeting wasm32."
);
#[cfg(all(target_arch = "wasm32", feature = "curl-backend"))]
compile_error!(
"Backend selection is not allowed on wasm32 targets. \
The web backend using the browser's Fetch API is always used automatically. \
Please remove the `curl-backend` feature when targeting wasm32."
);