toolkit_zero/location/mod.rs
1//! Geographic location acquisition API.
2//!
3//! This module serves as the authoritative entry point for all geographic
4//! coordinate retrieval within the toolkit. It is structured around the
5//! concept of interchangeable *acquisition strategies*: each sub-module
6//! implements a self-contained mechanism for obtaining location data,
7//! allowing new strategies to be introduced incrementally without disrupting
8//! the existing public interface.
9//!
10//! # Acquisition strategies
11//!
12//! | Sub-module | Mechanism | Platform support |
13//! |---|---|---|
14//! | [`browser`] | Instantiates a transient local HTTP server and directs the
15//! system's default browser to a consent page, which acquires coordinates
16//! through the standardised [Web Geolocation API]. | Platform-independent |
17//!
18//! [Web Geolocation API]: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API
19//!
20//! # Feature flag
21//!
22//! This module is compiled when the `location` (or `location-native`) feature is enabled:
23//!
24//! ```toml
25//! [dependencies]
26//! toolkit-zero = { version = "...", features = ["location"] }
27//! ```
28
29#[cfg(feature = "location-native")]
30pub mod browser;
31
32#[cfg(feature = "backend-deps")]
33pub mod backend_deps;