SpatioService

Trait SpatioService 

Source
pub trait SpatioService: Sized {
Show 18 methods // Required methods async fn upsert( self, context: Context, namespace: String, id: String, point: Point3d, metadata: Value, ) -> Result<(), String>; async fn get( self, context: Context, namespace: String, id: String, ) -> Result<Option<CurrentLocation>, String>; async fn delete( self, context: Context, namespace: String, id: String, ) -> Result<(), String>; async fn query_radius( self, context: Context, namespace: String, center: Point3d, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>; async fn knn( self, context: Context, namespace: String, center: Point3d, k: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>; async fn query_bbox( self, context: Context, namespace: String, min_x: f64, min_y: f64, max_x: f64, max_y: f64, limit: usize, ) -> Result<Vec<CurrentLocation>, String>; async fn query_cylinder( self, context: Context, namespace: String, center: Point, min_z: f64, max_z: f64, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>; async fn query_trajectory( self, context: Context, namespace: String, id: String, start_time: Option<f64>, end_time: Option<f64>, limit: usize, ) -> Result<Vec<LocationUpdate>, String>; async fn insert_trajectory( self, context: Context, namespace: String, id: String, trajectory: Vec<(f64, Point3d, Value)>, ) -> Result<(), String>; async fn query_bbox_3d( self, context: Context, namespace: String, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64, limit: usize, ) -> Result<Vec<CurrentLocation>, String>; async fn query_near( self, context: Context, namespace: String, id: String, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>; async fn contains( self, context: Context, namespace: String, polygon: Polygon, limit: usize, ) -> Result<Vec<CurrentLocation>, String>; async fn distance( self, context: Context, namespace: String, id1: String, id2: String, metric: Option<DistanceMetric>, ) -> Result<Option<f64>, String>; async fn distance_to( self, context: Context, namespace: String, id: String, point: Point, metric: Option<DistanceMetric>, ) -> Result<Option<f64>, String>; async fn convex_hull( self, context: Context, namespace: String, ) -> Result<Option<Polygon>, String>; async fn bounding_box( self, context: Context, namespace: String, ) -> Result<Option<BoundingBox2D>, String>; async fn stats(self, context: Context) -> Stats; // Provided method fn serve(self) -> ServeSpatioService<Self> { ... }
}

Required Methods§

Source

async fn upsert( self, context: Context, namespace: String, id: String, point: Point3d, metadata: Value, ) -> Result<(), String>

Source

async fn get( self, context: Context, namespace: String, id: String, ) -> Result<Option<CurrentLocation>, String>

Source

async fn delete( self, context: Context, namespace: String, id: String, ) -> Result<(), String>

Source

async fn query_radius( self, context: Context, namespace: String, center: Point3d, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>

Source

async fn knn( self, context: Context, namespace: String, center: Point3d, k: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>

Source

async fn query_bbox( self, context: Context, namespace: String, min_x: f64, min_y: f64, max_x: f64, max_y: f64, limit: usize, ) -> Result<Vec<CurrentLocation>, String>

Source

async fn query_cylinder( self, context: Context, namespace: String, center: Point, min_z: f64, max_z: f64, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>

Source

async fn query_trajectory( self, context: Context, namespace: String, id: String, start_time: Option<f64>, end_time: Option<f64>, limit: usize, ) -> Result<Vec<LocationUpdate>, String>

Source

async fn insert_trajectory( self, context: Context, namespace: String, id: String, trajectory: Vec<(f64, Point3d, Value)>, ) -> Result<(), String>

Source

async fn query_bbox_3d( self, context: Context, namespace: String, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64, limit: usize, ) -> Result<Vec<CurrentLocation>, String>

Source

async fn query_near( self, context: Context, namespace: String, id: String, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>

Source

async fn contains( self, context: Context, namespace: String, polygon: Polygon, limit: usize, ) -> Result<Vec<CurrentLocation>, String>

Source

async fn distance( self, context: Context, namespace: String, id1: String, id2: String, metric: Option<DistanceMetric>, ) -> Result<Option<f64>, String>

Source

async fn distance_to( self, context: Context, namespace: String, id: String, point: Point, metric: Option<DistanceMetric>, ) -> Result<Option<f64>, String>

Source

async fn convex_hull( self, context: Context, namespace: String, ) -> Result<Option<Polygon>, String>

Source

async fn bounding_box( self, context: Context, namespace: String, ) -> Result<Option<BoundingBox2D>, String>

Source

async fn stats(self, context: Context) -> Stats

Provided Methods§

Source

fn serve(self) -> ServeSpatioService<Self>

Returns a serving function to use with InFlightRequest::execute.

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§