pub trait GeoCommands<'a>: Sized {
// Provided methods
fn geoadd(
self,
key: impl Args,
condition: GeoAddCondition,
change: bool,
items: impl Args,
) -> PreparedCommand<'a, Self, usize> { ... }
fn geodist(
self,
key: impl Args,
member1: impl Args,
member2: impl Args,
unit: GeoUnit,
) -> PreparedCommand<'a, Self, Option<f64>> { ... }
fn geohash<R: Response>(
self,
key: impl Args,
members: impl Args,
) -> PreparedCommand<'a, Self, R> { ... }
fn geopos(
self,
key: impl Args,
members: impl Args,
) -> PreparedCommand<'a, Self, Vec<Option<(f64, f64)>>> { ... }
fn geosearch<F: Args, R: Response>(
self,
key: impl Args,
from: GeoSearchFrom<F>,
by: GeoSearchBy,
options: GeoSearchOptions,
) -> PreparedCommand<'a, Self, R> { ... }
fn geosearchstore<F: Args>(
self,
destination: impl Args,
source: impl Args,
from: GeoSearchFrom<F>,
by: GeoSearchBy,
options: GeoSearchStoreOptions,
) -> PreparedCommand<'a, Self, usize> { ... }
}Expand description
Provided Methods§
Sourcefn geoadd(
self,
key: impl Args,
condition: GeoAddCondition,
change: bool,
items: impl Args,
) -> PreparedCommand<'a, Self, usize>
fn geoadd( self, key: impl Args, condition: GeoAddCondition, change: bool, items: impl Args, ) -> PreparedCommand<'a, Self, usize>
Adds the specified geospatial items (longitude, latitude, name) to the specified key.
§Return
- When used without optional arguments, the number of elements added to the sorted set (excluding score updates).
- If the CH option is specified, the number of elements that were changed (added or updated).
§See Also
Sourcefn geodist(
self,
key: impl Args,
member1: impl Args,
member2: impl Args,
unit: GeoUnit,
) -> PreparedCommand<'a, Self, Option<f64>>
fn geodist( self, key: impl Args, member1: impl Args, member2: impl Args, unit: GeoUnit, ) -> PreparedCommand<'a, Self, Option<f64>>
Sourcefn geohash<R: Response>(
self,
key: impl Args,
members: impl Args,
) -> PreparedCommand<'a, Self, R>
fn geohash<R: Response>( self, key: impl Args, members: impl Args, ) -> PreparedCommand<'a, Self, R>
Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using geoadd).
§Return
An array where each element is the Geohash corresponding to each member name passed as argument to the command.
§See Also
Sourcefn geopos(
self,
key: impl Args,
members: impl Args,
) -> PreparedCommand<'a, Self, Vec<Option<(f64, f64)>>>
fn geopos( self, key: impl Args, members: impl Args, ) -> PreparedCommand<'a, Self, Vec<Option<(f64, f64)>>>
Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
§Return
n array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non existing elements are reported as NULL elements of the array.
§See Also
Sourcefn geosearch<F: Args, R: Response>(
self,
key: impl Args,
from: GeoSearchFrom<F>,
by: GeoSearchBy,
options: GeoSearchOptions,
) -> PreparedCommand<'a, Self, R>
fn geosearch<F: Args, R: Response>( self, key: impl Args, from: GeoSearchFrom<F>, by: GeoSearchBy, options: GeoSearchOptions, ) -> PreparedCommand<'a, Self, R>
Sourcefn geosearchstore<F: Args>(
self,
destination: impl Args,
source: impl Args,
from: GeoSearchFrom<F>,
by: GeoSearchBy,
options: GeoSearchStoreOptions,
) -> PreparedCommand<'a, Self, usize>
fn geosearchstore<F: Args>( self, destination: impl Args, source: impl Args, from: GeoSearchFrom<F>, by: GeoSearchBy, options: GeoSearchStoreOptions, ) -> PreparedCommand<'a, Self, usize>
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.