CanPerformGeoLookup

Trait CanPerformGeoLookup 

Source
pub trait CanPerformGeoLookup:
    HasLookupData
    + HasGeometry
    + HasProperties
where 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§

Source

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.

Source

fn lookup_slow(xf: Float, yf: Float) -> Vec<&'static Self>

Get the exact item for a given longitude (x) and latitude (y).

Source

fn memory_data_to_geojson() -> String

Gets the geojson representation of the memory cache.

Source

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", so this trait is not object safe.

Implementors§