pub trait CanPerformGeoLookup:
HasLookupData
+ HasGeometry
+ HasPropertieswhere
Self: 'static,{
// Provided methods
fn lookup(xf: Float, yf: Float) -> Vec<&'static Self> { ... }
fn lookup_slow(xf: Float, yf: Float) -> Vec<&'static Self> { ... }
fn memory_data_to_geojson() -> String { ... }
fn get_lookup_suggestions(
x: RoundDegree,
y: RoundDegree,
) -> Option<Vec<&'static Self>> { ... }
}Expand description
Trait that abstracts away the primary end-user functionality of geo lookups.
Provided Methods§
Sourcefn lookup(xf: Float, yf: Float) -> Vec<&'static Self>
fn lookup(xf: Float, yf: Float) -> Vec<&'static Self>
Get the cache-driven item for a given longitude (x) and latitude (y).
Some data sources allow for multiple results, so this is a vector.
Sourcefn lookup_slow(xf: Float, yf: Float) -> Vec<&'static Self>
fn lookup_slow(xf: Float, yf: Float) -> Vec<&'static Self>
Get the exact item for a given longitude (x) and latitude (y).
Sourcefn memory_data_to_geojson() -> String
fn memory_data_to_geojson() -> String
Gets the geojson representation of the memory cache.
Sourcefn get_lookup_suggestions(
x: RoundDegree,
y: RoundDegree,
) -> Option<Vec<&'static Self>>
fn get_lookup_suggestions( x: RoundDegree, y: RoundDegree, ) -> Option<Vec<&'static Self>>
Get value from the static memory cache.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".