Skip to main content

SpatialIndex

Trait SpatialIndex 

Source
pub trait SpatialIndex: Send + Sync {
    // Required methods
    fn add(&mut self, doc_id: DocId, lon: f64, lat: f64);
    fn remove(&mut self, doc_id: DocId);
    fn clear(&mut self);
    fn search_within(
        &self,
        center_lon: f64,
        center_lat: f64,
        radius_m: f64,
    ) -> PostingList;
    fn count(&self) -> usize;
    fn snapshot(&self) -> Arc<dyn SpatialIndex> ;
}

Required Methods§

Source

fn add(&mut self, doc_id: DocId, lon: f64, lat: f64)

Source

fn remove(&mut self, doc_id: DocId)

Source

fn clear(&mut self)

Source

fn search_within( &self, center_lon: f64, center_lat: f64, radius_m: f64, ) -> PostingList

Source

fn count(&self) -> usize

Source

fn snapshot(&self) -> Arc<dyn SpatialIndex>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§