pub mod geo_hash;
use bitflags::bitflags;
pub use geo_hash::{GeoDistanceUnitType, GeoHash};
bitflags! {
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct GeoAddOptions: u8 {
const NONE = 0;
const NX = 1 << 0;
const XX = 1 << 1;
const CH = 1 << 2;
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[repr(u8)]
pub enum GeoOrder {
#[default]
None = 0,
Ascending,
Descending,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[repr(u8)]
pub enum GeoOriginType {
#[default]
Undefined = 0,
FromLonLat,
FromMember,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[repr(u8)]
pub enum GeoSearchType {
#[default]
Undefined = 0,
ByRadius,
ByBox,
}
#[derive(Debug, Clone, Default)]
pub struct GeoSearchOptions {
pub search_type: GeoSearchType,
pub unit: GeoDistanceUnitType,
pub radius: f64,
pub box_width: f64,
pub count_value: i64,
pub origin: GeoOriginType,
pub from_member: Vec<u8>,
pub lon: f64,
pub lat: f64,
pub with_coord: bool,
pub with_hash: bool,
pub with_count_any: bool,
pub with_dist: bool,
pub sort: GeoOrder,
}