Skip to main content

provider_client

Macro provider_client 

Source
macro_rules! provider_client {
    (
        $(#[$struct_documentation:meta])*
        $struct_name:ident, $provider_name:literal
    ) => { ... };
}
Expand description

Generates a provider client struct that wraps everymap_core::client::ProviderClient.

Expands to a public struct holding a private inner: ProviderClient, a private PROVIDER_NAME const, and the standard methods shared by every provider client wrapper: new, with_client_builder, set_verbose, is_verbose, build_request, request, and request_json.

Provider-specific methods (e.g. Radar’s post_json) stay outside the macro as inherent methods on the generated struct in the same module, accessing inner directly.

Usage:

everymap_core::provider_client! {
    /// The shared HTTP client for Google Maps APIs.
    GoogleClient, "google"
}