pub struct GoogleClient { /* private fields */ }Expand description
The shared HTTP client for Google Maps APIs.
Delegates to everymap_core::client::ProviderClient for common
request/response logic. Each domain module constructs its own
base URL per the Google Maps API specification.
Implementations§
Source§impl GoogleClient
impl GoogleClient
Sourcepub fn new(auth_provider: Arc<dyn AuthProvider>) -> Self
pub fn new(auth_provider: Arc<dyn AuthProvider>) -> Self
Creates a new GoogleClient with the given authentication provider.
Sourcepub fn with_client_builder(
builder: ClientBuilder,
auth_provider: Arc<dyn AuthProvider>,
) -> EveryMapResult<Self>
pub fn with_client_builder( builder: ClientBuilder, auth_provider: Arc<dyn AuthProvider>, ) -> EveryMapResult<Self>
Creates a GoogleClient with a custom reqwest::Client configuration.
Sourcepub fn set_verbose(&mut self, verbose: bool)
pub fn set_verbose(&mut self, verbose: bool)
Enable or disable verbose output (request/response logging to stderr).
Sourcepub fn is_verbose(&self) -> bool
pub fn is_verbose(&self) -> bool
Whether verbose mode is enabled.
Sourcepub fn build_request(&self, method: Method, url: &str) -> RequestBuilder
pub fn build_request(&self, method: Method, url: &str) -> RequestBuilder
Builds a request to the given full URL with the specified HTTP method.
Sourcepub async fn request(&self, builder: RequestBuilder) -> EveryMapResult<Response>
pub async fn request(&self, builder: RequestBuilder) -> EveryMapResult<Response>
Sends a request, applying authentication first.
Sourcepub async fn request_json<T: DeserializeOwned>(
&self,
builder: RequestBuilder,
) -> EveryMapResult<T>
pub async fn request_json<T: DeserializeOwned>( &self, builder: RequestBuilder, ) -> EveryMapResult<T>
Sends a request and deserializes the JSON response into T.
Auto Trait Implementations§
impl !RefUnwindSafe for GoogleClient
impl !UnwindSafe for GoogleClient
impl Freeze for GoogleClient
impl Send for GoogleClient
impl Sync for GoogleClient
impl Unpin for GoogleClient
impl UnsafeUnpin for GoogleClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more