pub struct HereClient { /* private fields */ }Expand description
The shared HTTP client for HERE Technologies APIs.
Delegates to everymap_core::client::ProviderClient for common
request/response logic. Each domain module constructs its own
base URL per the HERE API specification.
Implementations§
Source§impl HereClient
impl HereClient
Sourcepub fn new(auth_provider: Arc<dyn AuthProvider>) -> Self
pub fn new(auth_provider: Arc<dyn AuthProvider>) -> Self
Creates a new HereClient 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 HereClient 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 HereClient
impl !UnwindSafe for HereClient
impl Freeze for HereClient
impl Send for HereClient
impl Sync for HereClient
impl Unpin for HereClient
impl UnsafeUnpin for HereClient
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