pub trait GeoCommands {
// Provided methods
fn geoadd<K, M, I>(
&mut self,
key: K,
condition: GeoAddCondition,
change: bool,
items: I,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg>,
I: ArgsOrCollection<(f64, f64, M)> { ... }
fn geodist<K, M>(
&mut self,
key: K,
member1: M,
member2: M,
unit: GeoUnit,
) -> PreparedCommand<'_, Self, Option<f64>>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg> { ... }
fn geohash<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<String>>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg>,
C: SingleArgOrCollection<M> { ... }
fn geopos<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<Option<(f64, f64)>>>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg>,
C: SingleArgOrCollection<M> { ... }
fn geosearch<K, M1, M2, A>(
&mut self,
key: K,
from: GeoSearchFrom<M1>,
by: GeoSearchBy,
options: GeoSearchOptions,
) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M1: Into<CommandArg>,
M2: FromValue,
A: FromSingleValueArray<GeoSearchResult<M2>> { ... }
fn geosearchstore<D, S, M>(
&mut self,
destination: D,
source: S,
from: GeoSearchFrom<M>,
by: GeoSearchBy,
options: GeoSearchStoreOptions,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
D: Into<CommandArg>,
S: Into<CommandArg>,
M: Into<CommandArg> { ... }
}
Expand description
Provided Methods§
Sourcefn geoadd<K, M, I>(
&mut self,
key: K,
condition: GeoAddCondition,
change: bool,
items: I,
) -> PreparedCommand<'_, Self, usize>
fn geoadd<K, M, I>( &mut self, key: K, condition: GeoAddCondition, change: bool, items: I, ) -> PreparedCommand<'_, 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<K, M>(
&mut self,
key: K,
member1: M,
member2: M,
unit: GeoUnit,
) -> PreparedCommand<'_, Self, Option<f64>>
fn geodist<K, M>( &mut self, key: K, member1: M, member2: M, unit: GeoUnit, ) -> PreparedCommand<'_, Self, Option<f64>>
Sourcefn geohash<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<String>>
fn geohash<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, Vec<String>>
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<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<Option<(f64, f64)>>>
fn geopos<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, 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.