Skip to main content

Crate everymap_core

Crate everymap_core 

Source
Expand description

Core traits, types, and error handling for the EveryMap geospatial API abstraction.

This crate defines 10 domain traits (geocoding, routing, isolines, map matching, tour planning, traffic, tiling, positioning, attributes, and imaging) that provider crates implement. It also provides shared infrastructure: authentication, HTTP client logic, error types, and unsupported-domain stub macros.

§Architecture

ModulePurpose
domains10 domain traits with concrete option/response types
authAuthProvider, ApiKeyProvider, HeaderAuthProvider
clientShared ProviderClient HTTP logic
typesCoordinate, BoundingBox, Address, Polyline
errorStructured EveryMapError with 9 variants

§Quick Start

use everymap_core::domains::search::{Geocoder, GeocodeOptions};
use everymap_core::auth::ApiKeyProvider;
use std::sync::Arc;
let auth = Arc::new(ApiKeyProvider::new("key".into(), "apiKey".into()));
// Provider crates implement the domain traits:
// use everymap_providers_here::domain::search::HereGeocoder;

Re-exports§

pub use auth::*;
pub use domains::*;
pub use error::*;
pub use types::*;

Modules§

auth
client
domains
error
types
unsupported
Macros for generating unsupported domain stub implementations.

Macros§

unsupported_attributes
Generates an unsupported AttributeProvider stub implementation.
unsupported_image
Generates an unsupported MapImageProvider stub implementation.
unsupported_isoline
Generates an unsupported IsolineProvider stub implementation.
unsupported_positioner
Generates an unsupported NetworkPositioner stub implementation.
unsupported_tile
Generates an unsupported TileProvider stub implementation.
unsupported_tour
Generates an unsupported TourPlanner stub implementation.
unsupported_traffic
Generates an unsupported TrafficProvider stub implementation.