pub struct RegionDb { /* private fields */ }Expand description
An opened region database.
Implementations§
Source§impl RegionDb
impl RegionDb
Sourcepub fn format_version(&self) -> i64
pub fn format_version(&self) -> i64
The database format version.
Sourcepub fn dataset_version(&self) -> &str
pub fn dataset_version(&self) -> &str
The geographic data release, such as 2026.08.1.
Sourcepub fn metadata(&self) -> &HashMap<String, String>
pub fn metadata(&self) -> &HashMap<String, String>
Raw metadata, including source attribution and the content hash.
Sourcepub fn region_count(&self) -> usize
pub fn region_count(&self) -> usize
How many regions the database holds.
Sourcepub fn lookup_codes(
&self,
latitude: f64,
longitude: f64,
) -> Result<RegionLookup, RegionDbError>
pub fn lookup_codes( &self, latitude: f64, longitude: f64, ) -> Result<RegionLookup, RegionDbError>
Look up a position, returning only what a repeater needs.
Sourcepub fn lookup_detailed(
&self,
latitude: f64,
longitude: f64,
) -> Result<RegionLookup, RegionDbError>
pub fn lookup_detailed( &self, latitude: f64, longitude: f64, ) -> Result<RegionLookup, RegionDbError>
Look up a position, keeping every semantic match for display.
Sourcepub fn lookup_exhaustive(
&self,
latitude: f64,
longitude: f64,
) -> Result<RegionLookup, RegionDbError>
pub fn lookup_exhaustive( &self, latitude: f64, longitude: f64, ) -> Result<RegionLookup, RegionDbError>
Answer with the sampled test against every region, ignoring both the lookup cache and the R-tree.
The cache and the candidate filter are optimizations over the same core polygons, never a second source of truth, and this is how the build proves it.