Trait redis_driver::SortedSetCommands
source · [−]pub trait SortedSetCommands: CommandSend {
Show 27 methods
fn zadd<K>(&self, key: K) -> ZAdd<'_, Self>
where
K: Into<BulkString>,
{ ... }
fn zcard<K>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
{ ... }
fn zcount<K, T, U>(
&self,
key: K,
min: T,
max: U
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
T: Into<BulkString>,
U: Into<BulkString>,
{ ... }
fn zdiff<K, C>(&self, keys: C) -> ZDiff<'_, Self>
where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn zdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn zincrby<K, M>(
&self,
key: K,
increment: f64,
member: M
) -> Pin<Box<dyn Future<Output = Result<f64>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn zinter<K, C>(&self, keys: C) -> ZInterUnion<'_, Self>
where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn zintercard<K, C>(
&self,
keys: C,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn zinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> ZInterUnionStore<'_, Self>
where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn zlexcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
{ ... }
fn zmpop<K, C, E>(
&self,
keys: C,
where_: ZWhere,
count: usize
) -> Pin<Box<dyn Future<Output = Result<(String, Vec<(E, f64)>)>> + '_>>
where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue + Default,
{ ... }
fn zmscore<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<f64>>>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn zpopmax<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<(M, f64)>>> + '_>>
where
K: Into<BulkString>,
M: FromValue,
{ ... }
fn zpopmin<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<(M, f64)>>> + '_>>
where
K: Into<BulkString>,
M: FromValue,
{ ... }
fn zrandmember<K>(&self, key: K) -> ZRandMember<'_, Self>
where
K: Into<BulkString>,
{ ... }
fn zrange<K, S>(&self, key: K, start: S, stop: S) -> ZRange<'_, Self>
where
K: Into<BulkString>,
S: Into<BulkString>,
{ ... }
fn zrangestore<D, S, T>(
&self,
dst: D,
src: S,
start: T,
stop: T
) -> ZRangeStore<'_, Self>
where
D: Into<BulkString>,
S: Into<BulkString>,
T: Into<BulkString>,
{ ... }
fn zrank<K, M>(
&self,
key: K,
member: M
) -> Pin<Box<dyn Future<Output = Result<Option<usize>>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn zrem<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn zremrangebylex<K, S>(
&self,
key: K,
start: S,
stop: S
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
S: Into<BulkString>,
{ ... }
fn zremrangebyrank<K>(
&self,
key: K,
start: isize,
stop: isize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
{ ... }
fn zremrangebyscore<K, S>(
&self,
key: K,
start: S,
stop: S
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
S: Into<BulkString>,
{ ... }
fn zrevrank<K, M>(
&self,
key: K,
member: M
) -> Pin<Box<dyn Future<Output = Result<Option<usize>>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn zscan<K>(&self, key: K, cursor: usize) -> ZScan<'_, Self>
where
K: Into<BulkString>,
{ ... }
fn zscore<K, M>(
&self,
key: K,
member: M
) -> Pin<Box<dyn Future<Output = Result<Option<f64>>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn zunion<K, C>(&self, keys: C) -> ZInterUnion<'_, Self>
where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn zunionstore<D, K, C>(
&self,
destination: D,
keys: C
) -> ZInterUnionStore<'_, Self>
where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
}
Expand description
Provided Methods
sourcefn zadd<K>(&self, key: K) -> ZAdd<'_, Self>where
K: Into<BulkString>,
fn zadd<K>(&self, key: K) -> ZAdd<'_, Self>where
K: Into<BulkString>,
Adds all the specified members with the specified scores to the sorted set stored at key.
See Also
sourcefn zcount<K, T, U>(
&self,
key: K,
min: T,
max: U
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
T: Into<BulkString>,
U: Into<BulkString>,
fn zcount<K, T, U>(
&self,
key: K,
min: T,
max: U
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
T: Into<BulkString>,
U: Into<BulkString>,
sourcefn zdiff<K, C>(&self, keys: C) -> ZDiff<'_, Self>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zdiff<K, C>(&self, keys: C) -> ZDiff<'_, Self>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
This command is similar to zdiffstore, but instead of storing the resulting sorted set, it is returned to the client.
Return
The number of elements in the specified score range.
See Also
sourcefn zdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn zinter<K, C>(&self, keys: C) -> ZInterUnion<'_, Self>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zinter<K, C>(&self, keys: C) -> ZInterUnion<'_, Self>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
This command is similar to zinterstore, but instead of storing the resulting sorted set, it is returned to the client.
See Also
sourcefn zintercard<K, C>(
&self,
keys: C,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zintercard<K, C>(
&self,
keys: C,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn zinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> ZInterUnionStore<'_, Self>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> ZInterUnionStore<'_, Self>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn zlexcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
fn zlexcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
sourcefn zmscore<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<f64>>>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn zmscore<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<f64>>>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
sourcefn zrandmember<K>(&self, key: K) -> ZRandMember<'_, Self>where
K: Into<BulkString>,
fn zrandmember<K>(&self, key: K) -> ZRandMember<'_, Self>where
K: Into<BulkString>,
sourcefn zrange<K, S>(&self, key: K, start: S, stop: S) -> ZRange<'_, Self>where
K: Into<BulkString>,
S: Into<BulkString>,
fn zrange<K, S>(&self, key: K, start: S, stop: S) -> ZRange<'_, Self>where
K: Into<BulkString>,
S: Into<BulkString>,
Returns the specified range of elements in the sorted set stored at key
.
See Also
sourcefn zrangestore<D, S, T>(
&self,
dst: D,
src: S,
start: T,
stop: T
) -> ZRangeStore<'_, Self>where
D: Into<BulkString>,
S: Into<BulkString>,
T: Into<BulkString>,
fn zrangestore<D, S, T>(
&self,
dst: D,
src: S,
start: T,
stop: T
) -> ZRangeStore<'_, Self>where
D: Into<BulkString>,
S: Into<BulkString>,
T: Into<BulkString>,
sourcefn zrem<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn zrem<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
sourcefn zremrangebylex<K, S>(
&self,
key: K,
start: S,
stop: S
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
S: Into<BulkString>,
fn zremrangebylex<K, S>(
&self,
key: K,
start: S,
stop: S
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
S: Into<BulkString>,
sourcefn zremrangebyscore<K, S>(
&self,
key: K,
start: S,
stop: S
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
S: Into<BulkString>,
fn zremrangebyscore<K, S>(
&self,
key: K,
start: S,
stop: S
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
S: Into<BulkString>,
sourcefn zunion<K, C>(&self, keys: C) -> ZInterUnion<'_, Self>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zunion<K, C>(&self, keys: C) -> ZInterUnion<'_, Self>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
This command is similar to zunionstore, but instead of storing the resulting sorted set, it is returned to the client.