everymap_core/lib.rs
1//! Core traits, types, and error handling for the EveryMap geospatial API abstraction.
2//!
3//! This crate defines 10 domain traits (geocoding, routing, isolines, map matching,
4//! tour planning, traffic, tiling, positioning, attributes, and imaging) that provider
5//! crates implement. It also provides shared infrastructure: authentication, HTTP client
6//! logic, error types, and unsupported-domain stub macros.
7//!
8//! # Architecture
9//!
10//! | Module | Purpose |
11//! |--------|---------|
12//! | [`domains`] | 10 domain traits with concrete option/response types |
13//! | [`auth`] | `AuthProvider`, `ApiKeyProvider`, `HeaderAuthProvider` |
14//! | [`client`] | Shared `ProviderClient` HTTP logic |
15//! | [`types`] | `Coordinate`, `BoundingBox`, `Address`, `Polyline` |
16//! | [`error`] | Structured `EveryMapError` with 9 variants |
17//!
18//! # Quick Start
19//!
20//! ```no_run
21//! use everymap_core::domains::search::{Geocoder, GeocodeOptions};
22//! use everymap_core::auth::ApiKeyProvider;
23//! use std::sync::Arc;
24//! # async fn example() {
25//! let auth = Arc::new(ApiKeyProvider::new("key".into(), "apiKey".into()));
26//! // Provider crates implement the domain traits:
27//! // use everymap_providers_here::domain::search::HereGeocoder;
28//! # }
29//! ```
30
31pub mod auth;
32pub mod client;
33pub mod domains;
34pub mod error;
35pub mod types;
36pub mod unsupported;
37
38pub use auth::*;
39pub use domains::*;
40pub use error::*;
41pub use types::*;