use crate::client::GoogleMapsClient;
impl GoogleMapsClient {
#[cfg(all(feature = "enable-reqwest", feature = "enable-reqwest-middleware"))]
pub fn with_reqwest_client(&mut self, reqwest_client: reqwest::Client) -> &mut Self {
self.reqwest_client = crate::reqwest_maybe_middleware::Client::Vanilla(reqwest_client);
self
}
#[cfg(all(feature = "enable-reqwest", not(feature = "enable-reqwest-middleware")))]
pub fn with_reqwest_client(&mut self, reqwest_client: reqwest::Client) -> &mut Self {
self.reqwest_client = reqwest_client;
self
}
#[cfg(all(feature = "enable-reqwest", feature = "enable-reqwest-middleware"))]
pub fn with_reqwest_middleware_client(
&mut self,
reqwest_client: reqwest_middleware::ClientWithMiddleware,
) -> &mut Self {
self.reqwest_client = crate::reqwest_maybe_middleware::Client::Middleware(reqwest_client);
self
}
#[cfg(all(feature = "enable-reqwest", feature = "enable-reqwest-middleware"))]
pub fn with_reqwest(
&mut self,
reqwest_client: crate::reqwest_maybe_middleware::Client,
) -> &mut Self {
self.reqwest_client = reqwest_client;
self
} }