Trait fred::interfaces::SortedSetsInterface

source ·
pub trait SortedSetsInterface: ClientLike + Sized {
Show 33 methods // Provided methods fn bzmpop<R, K>( &self, timeout: f64, keys: K, sort: ZCmp, count: Option<i64>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys> { ... } fn bzpopmin<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys> { ... } fn bzpopmax<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys> { ... } fn zadd<R, K, V>( &self, key: K, options: Option<SetOptions>, ordering: Option<Ordering>, changed: bool, incr: bool, values: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<MultipleZaddValues>, V::Error: Into<RedisError> { ... } fn zcard<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zcount<R, K>( &self, key: K, min: f64, max: f64, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zdiff<R, K>( &self, keys: K, withscores: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys> { ... } fn zdiffstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, D: Into<RedisKey>, K: Into<MultipleKeys> { ... } fn zincrby<R, K, V>( &self, key: K, increment: f64, member: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<RedisValue>, V::Error: Into<RedisError> { ... } fn zinter<R, K, W>( &self, keys: K, weights: W, aggregate: Option<AggregateOptions>, withscores: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys>, W: Into<MultipleWeights> { ... } fn zinterstore<R, D, K, W>( &self, dest: D, keys: K, weights: W, aggregate: Option<AggregateOptions>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights> { ... } fn zlexcount<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zpopmax<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zpopmin<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zmpop<R, K>( &self, keys: K, sort: ZCmp, count: Option<i64>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys> { ... } fn zrandmember<R, K>( &self, key: K, count: Option<(i64, bool)>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zrangestore<R, D, S, M, N>( &self, dest: D, source: S, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, D: Into<RedisKey>, S: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrange<R, K, M, N>( &self, key: K, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, withscores: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrangebylex<R, K, M, N>( &self, key: K, min: M, max: N, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrevrangebylex<R, K, M, N>( &self, key: K, max: M, min: N, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, withscores: bool, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrevrangebyscore<R, K, M, N>( &self, key: K, max: M, min: N, withscores: bool, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrank<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<RedisValue>, V::Error: Into<RedisError> { ... } fn zrem<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<MultipleValues>, V::Error: Into<RedisError> { ... } fn zremrangebylex<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zremrangebyrank<R, K>( &self, key: K, start: i64, stop: i64, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zremrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, M: TryInto<ZRange>, M::Error: Into<RedisError>, N: TryInto<ZRange>, N::Error: Into<RedisError> { ... } fn zrevrange<R, K>( &self, key: K, start: i64, stop: i64, withscores: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey> { ... } fn zrevrank<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<RedisValue>, V::Error: Into<RedisError> { ... } fn zscore<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<RedisValue>, V::Error: Into<RedisError> { ... } fn zunion<R, K, W>( &self, keys: K, weights: W, aggregate: Option<AggregateOptions>, withscores: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<MultipleKeys>, W: Into<MultipleWeights> { ... } fn zunionstore<R, D, K, W>( &self, dest: D, keys: K, weights: W, aggregate: Option<AggregateOptions>, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights> { ... } fn zmscore<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, K: Into<RedisKey>, V: TryInto<MultipleValues>, V::Error: Into<RedisError> { ... }
}
Available on crate feature i-sorted-sets only.
Expand description

Functions that implement the sorted sets interface.

Provided Methods§

source

fn bzmpop<R, K>( &self, timeout: f64, keys: K, sort: ZCmp, count: Option<i64>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<MultipleKeys>,

source

fn bzpopmin<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<MultipleKeys>,

source

fn bzpopmax<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<MultipleKeys>,

source

fn zadd<R, K, V>( &self, key: K, options: Option<SetOptions>, ordering: Option<Ordering>, changed: bool, incr: bool, values: V, ) -> impl Future<Output = RedisResult<R>>

Adds all the specified members with the specified scores to the sorted set stored at key.

https://redis.io/commands/zadd

source

fn zcard<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

https://redis.io/commands/zcard

source

fn zcount<R, K>( &self, key: K, min: f64, max: f64, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns the number of elements in the sorted set at key with a score between min and max.

https://redis.io/commands/zcount

source

fn zdiff<R, K>( &self, keys: K, withscores: bool, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<MultipleKeys>,

This command is similar to ZDIFFSTORE, but instead of storing the resulting sorted set, it is returned to the client.

https://redis.io/commands/zdiff

source

fn zdiffstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = RedisResult<R>>

Computes the difference between the first and all successive input sorted sets and stores the result in destination.

https://redis.io/commands/zdiffstore

source

fn zincrby<R, K, V>( &self, key: K, increment: f64, member: V, ) -> impl Future<Output = RedisResult<R>>

Increments the score of member in the sorted set stored at key by increment.

https://redis.io/commands/zincrby

source

fn zinter<R, K, W>( &self, keys: K, weights: W, aggregate: Option<AggregateOptions>, withscores: bool, ) -> impl Future<Output = RedisResult<R>>

This command is similar to ZINTERSTORE, but instead of storing the resulting sorted set, it is returned to the client.

https://redis.io/commands/zinter

source

fn zinterstore<R, D, K, W>( &self, dest: D, keys: K, weights: W, aggregate: Option<AggregateOptions>, ) -> impl Future<Output = RedisResult<R>>

Computes the intersection of the sorted sets given by the specified keys, and stores the result in destination.

https://redis.io/commands/zinterstore

source

fn zlexcount<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = RedisResult<R>>

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

https://redis.io/commands/zlexcount

source

fn zpopmax<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Removes and returns up to count members with the highest scores in the sorted set stored at key.

https://redis.io/commands/zpopmax

source

fn zpopmin<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Removes and returns up to count members with the lowest scores in the sorted set stored at key.

https://redis.io/commands/zpopmin

source

fn zmpop<R, K>( &self, keys: K, sort: ZCmp, count: Option<i64>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<MultipleKeys>,

Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of key names.

https://redis.io/commands/zmpop/

source

fn zrandmember<R, K>( &self, key: K, count: Option<(i64, bool)>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

When called with just the key argument, return a random element from the sorted set value stored at key.

https://redis.io/commands/zrandmember

source

fn zrangestore<R, D, S, M, N>( &self, dest: D, source: S, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>>

This command is like ZRANGE, but stores the result in the destination key.

https://redis.io/commands/zrangestore

source

fn zrange<R, K, M, N>( &self, key: K, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, withscores: bool, ) -> impl Future<Output = RedisResult<R>>

Returns the specified range of elements in the sorted set stored at key.

https://redis.io/commands/zrange

source

fn zrangebylex<R, K, M, N>( &self, key: K, min: M, max: N, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>>

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

https://redis.io/commands/zrangebylex

source

fn zrevrangebylex<R, K, M, N>( &self, key: K, max: M, min: N, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>>

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between max and min.

https://redis.io/commands/zrevrangebylex

source

fn zrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, withscores: bool, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>>

Returns all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).

https://redis.io/commands/zrangebyscore

source

fn zrevrangebyscore<R, K, M, N>( &self, key: K, max: M, min: N, withscores: bool, limit: Option<Limit>, ) -> impl Future<Output = RedisResult<R>>

Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

https://redis.io/commands/zrevrangebyscore

source

fn zrank<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = RedisResult<R>>

Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

https://redis.io/commands/zrank

source

fn zrem<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = RedisResult<R>>

Removes the specified members from the sorted set stored at key. Non existing members are ignored.

https://redis.io/commands/zrem

source

fn zremrangebylex<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = RedisResult<R>>

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

https://redis.io/commands/zremrangebylex

source

fn zremrangebyrank<R, K>( &self, key: K, start: i64, stop: i64, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Removes all elements in the sorted set stored at key with rank between start and stop.

https://redis.io/commands/zremrangebyrank

source

fn zremrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = RedisResult<R>>

Removes all elements in the sorted set stored at key with a score between min and max.

https://redis.io/commands/zremrangebyscore

source

fn zrevrange<R, K>( &self, key: K, start: i64, stop: i64, withscores: bool, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns the specified range of elements in the sorted set stored at key.

https://redis.io/commands/zrevrange

source

fn zrevrank<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = RedisResult<R>>

Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

https://redis.io/commands/zrevrank

source

fn zscore<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = RedisResult<R>>

Returns the score of member in the sorted set at key.

https://redis.io/commands/zscore

source

fn zunion<R, K, W>( &self, keys: K, weights: W, aggregate: Option<AggregateOptions>, withscores: bool, ) -> impl Future<Output = RedisResult<R>>

This command is similar to ZUNIONSTORE, but instead of storing the resulting sorted set, it is returned to the client.

https://redis.io/commands/zunion

source

fn zunionstore<R, D, K, W>( &self, dest: D, keys: K, weights: W, aggregate: Option<AggregateOptions>, ) -> impl Future<Output = RedisResult<R>>

Computes the union of the sorted sets given by the specified keys, and stores the result in destination.

https://redis.io/commands/zunionstore

source

fn zmscore<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = RedisResult<R>>

Returns the scores associated with the specified members in the sorted set stored at key.

https://redis.io/commands/zmscore

Object Safety§

This trait is not object safe.

Implementors§