pub struct Reader { /* private fields */ }Implementations§
Source§impl Reader
impl Reader
pub fn new(db: Arc<Spatio>) -> Self
pub fn get( &self, namespace: &str, id: &str, ) -> Result<Option<CurrentLocation>, String>
pub fn query_radius( &self, namespace: &str, center: &Point3d, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>
pub fn knn( &self, namespace: &str, center: &Point3d, k: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>
pub fn stats(&self) -> Stats
pub fn query_bbox( &self, namespace: &str, min_x: f64, min_y: f64, max_x: f64, max_y: f64, limit: usize, ) -> Result<Vec<CurrentLocation>, String>
pub fn query_cylinder( &self, namespace: &str, center: Point, min_z: f64, max_z: f64, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>
pub fn query_trajectory( &self, namespace: &str, id: &str, start_time: Option<f64>, end_time: Option<f64>, limit: usize, ) -> Result<Vec<LocationUpdate>, String>
pub 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>, String>
pub fn query_near( &self, namespace: &str, id: &str, radius: f64, limit: usize, ) -> Result<Vec<(CurrentLocation, f64)>, String>
pub fn contains( &self, namespace: &str, polygon: &Polygon, limit: usize, ) -> Result<Vec<CurrentLocation>, String>
pub fn distance( &self, namespace: &str, id1: &str, id2: &str, metric: Option<DistanceMetric>, ) -> Result<Option<f64>, String>
pub fn distance_to( &self, namespace: &str, id: &str, point: &Point, metric: Option<DistanceMetric>, ) -> Result<Option<f64>, String>
pub fn convex_hull(&self, namespace: &str) -> Result<Option<Polygon>, String>
pub fn bounding_box( &self, namespace: &str, ) -> Result<Option<BoundingBox2D>, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reader
impl !RefUnwindSafe for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl !UnwindSafe for Reader
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