pub struct SpatioServiceClient<Stub = Channel<SpatioServiceRequest, SpatioServiceResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl SpatioServiceClient
impl SpatioServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<SpatioServiceRequest, SpatioServiceResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<SpatioServiceRequest, SpatioServiceResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> SpatioServiceClient<Stub>
impl<Stub> SpatioServiceClient<Stub>
pub fn upsert( &self, ctx: Context, namespace: String, id: String, point: Point3d, metadata: Value, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn get( &self, ctx: Context, namespace: String, id: String, ) -> impl Future<Output = Result<Result<Option<CurrentLocation>, String>, RpcError>> + '_
pub fn delete( &self, ctx: Context, namespace: String, id: String, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn query_radius( &self, ctx: Context, namespace: String, center: Point3d, radius: f64, limit: usize, ) -> impl Future<Output = Result<Result<Vec<(CurrentLocation, f64)>, String>, RpcError>> + '_
pub fn knn( &self, ctx: Context, namespace: String, center: Point3d, k: usize, ) -> impl Future<Output = Result<Result<Vec<(CurrentLocation, f64)>, String>, RpcError>> + '_
pub fn query_bbox( &self, ctx: Context, namespace: String, min_x: f64, min_y: f64, max_x: f64, max_y: f64, limit: usize, ) -> impl Future<Output = Result<Result<Vec<CurrentLocation>, String>, RpcError>> + '_
pub fn query_cylinder( &self, ctx: Context, namespace: String, center: Point, min_z: f64, max_z: f64, radius: f64, limit: usize, ) -> impl Future<Output = Result<Result<Vec<(CurrentLocation, f64)>, String>, RpcError>> + '_
pub fn query_trajectory( &self, ctx: Context, namespace: String, id: String, start_time: Option<f64>, end_time: Option<f64>, limit: usize, ) -> impl Future<Output = Result<Result<Vec<LocationUpdate>, String>, RpcError>> + '_
pub fn insert_trajectory( &self, ctx: Context, namespace: String, id: String, trajectory: Vec<(f64, Point3d, Value)>, ) -> impl Future<Output = Result<Result<(), String>, RpcError>> + '_
pub fn query_bbox_3d( &self, ctx: Context, namespace: String, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64, limit: usize, ) -> impl Future<Output = Result<Result<Vec<CurrentLocation>, String>, RpcError>> + '_
pub fn query_near( &self, ctx: Context, namespace: String, id: String, radius: f64, limit: usize, ) -> impl Future<Output = Result<Result<Vec<(CurrentLocation, f64)>, String>, RpcError>> + '_
pub fn contains( &self, ctx: Context, namespace: String, polygon: Polygon, limit: usize, ) -> impl Future<Output = Result<Result<Vec<CurrentLocation>, String>, RpcError>> + '_
pub fn distance( &self, ctx: Context, namespace: String, id1: String, id2: String, metric: Option<DistanceMetric>, ) -> impl Future<Output = Result<Result<Option<f64>, String>, RpcError>> + '_
pub fn distance_to( &self, ctx: Context, namespace: String, id: String, point: Point, metric: Option<DistanceMetric>, ) -> impl Future<Output = Result<Result<Option<f64>, String>, RpcError>> + '_
pub fn convex_hull( &self, ctx: Context, namespace: String, ) -> impl Future<Output = Result<Result<Option<Polygon>, String>, RpcError>> + '_
pub fn bounding_box( &self, ctx: Context, namespace: String, ) -> impl Future<Output = Result<Result<Option<BoundingBox2D>, String>, RpcError>> + '_
pub fn stats( &self, ctx: Context, ) -> impl Future<Output = Result<Stats, RpcError>> + '_
Trait Implementations§
Source§impl<Stub: Clone> Clone for SpatioServiceClient<Stub>
impl<Stub: Clone> Clone for SpatioServiceClient<Stub>
Source§fn clone(&self) -> SpatioServiceClient<Stub>
fn clone(&self) -> SpatioServiceClient<Stub>
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 moreSource§impl<Stub: Debug> Debug for SpatioServiceClient<Stub>
impl<Stub: Debug> Debug for SpatioServiceClient<Stub>
Source§impl<Stub> From<Stub> for SpatioServiceClient<Stub>
impl<Stub> From<Stub> for SpatioServiceClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for SpatioServiceClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for SpatioServiceClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for SpatioServiceClient<Stub>where
Stub: Send,
impl<Stub> Sync for SpatioServiceClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for SpatioServiceClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for SpatioServiceClient<Stub>where
Stub: UnwindSafe,
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