pub struct SpatioClient { /* private fields */ }Implementations§
Source§impl SpatioClient
impl SpatioClient
pub async fn connect(addr: SocketAddr) -> Result<Self>
pub async fn upsert( &self, namespace: &str, id: &str, point: Point3d, metadata: Value, ) -> Result<()>
pub async fn get( &self, namespace: &str, id: &str, ) -> Result<Option<CurrentLocation>>
pub async fn delete(&self, namespace: &str, id: &str) -> Result<()>
pub async fn query_radius( &self, namespace: &str, center: Point3d, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>>
pub async fn knn( &self, namespace: &str, center: Point3d, k: usize, ) -> Result<Vec<(CurrentLocation, f64)>>
pub async fn stats(&self) -> Result<Stats>
pub async fn query_bbox( &self, namespace: &str, min_x: f64, min_y: f64, max_x: f64, max_y: f64, limit: usize, ) -> Result<Vec<CurrentLocation>>
pub async fn query_cylinder( &self, namespace: &str, center: Point, min_z: f64, max_z: f64, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>>
pub async fn query_trajectory( &self, namespace: &str, id: &str, start_time: Option<f64>, end_time: Option<f64>, limit: usize, ) -> Result<Vec<LocationUpdate>>
pub async fn insert_trajectory( &self, namespace: &str, id: &str, trajectory: Vec<(f64, Point3d, Value)>, ) -> Result<()>
pub async fn query_bbox_3d( &self, namespace: &str, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64, limit: usize, ) -> Result<Vec<CurrentLocation>>
pub async fn query_near( &self, namespace: &str, id: &str, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>>
pub async fn contains( &self, namespace: &str, polygon: Polygon, limit: usize, ) -> Result<Vec<CurrentLocation>>
pub async fn distance( &self, namespace: &str, id1: &str, id2: &str, metric: Option<DistanceMetric>, ) -> Result<Option<f64>>
pub async fn distance_to( &self, namespace: &str, id: &str, point: Point, metric: Option<DistanceMetric>, ) -> Result<Option<f64>>
pub async fn convex_hull(&self, namespace: &str) -> Result<Option<Polygon>>
pub async fn bounding_box( &self, namespace: &str, ) -> Result<Option<BoundingBox2D>>
Trait Implementations§
Source§impl Clone for SpatioClient
impl Clone for SpatioClient
Source§fn clone(&self) -> SpatioClient
fn clone(&self) -> SpatioClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SpatioClient
impl RefUnwindSafe for SpatioClient
impl Send for SpatioClient
impl Sync for SpatioClient
impl Unpin for SpatioClient
impl UnwindSafe for SpatioClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more