use crate::types::*;
use crate::protocol::types::RedisCommandKind;
use futures::{
Future,
Stream
};
use crate::error::RedisError;
use crate::utils;
use crate::protocol::utils as protocol_utils;
use crate::client::RedisClient;
use crate::commands;
use tokio_core::reactor::Handle;
use std::collections::HashMap;
use std::hash::Hash;
pub trait RedisClientBorrowed {
fn quit(&self) -> Box<Future<Item=(), Error=RedisError>>;
fn flushall(&self, _async: bool) -> Box<Future<Item=String, Error=RedisError>>;
fn get<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>>;
fn set<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V, expire: Option<Expiration>, options: Option<SetOptions>) -> Box<Future<Item=bool, Error=RedisError>>;
fn select(&self, db: u8) -> Box<Future<Item=(), Error=RedisError>>;
fn info(&self, section: Option<InfoKind>) -> Box<Future<Item=String, Error=RedisError>>;
fn del<K: Into<MultipleKeys>>(&self, keys: K) -> Box<Future<Item=usize, Error=RedisError>>;
fn subscribe<T: Into<String>>(&self, channel: T) -> Box<Future<Item=usize, Error=RedisError>>;
fn unsubscribe<T: Into<String>>(&self, channel: T) -> Box<Future<Item=usize, Error=RedisError>>;
fn publish<T: Into<String>, V: Into<RedisValue>>(&self, channel: T, message: V) -> Box<Future<Item=i64, Error=RedisError>>;
fn decr<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=i64, Error=RedisError>>;
fn decrby<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=i64, Error=RedisError>>;
fn incr<K: Into<RedisKey>> (&self, key: K) -> Box<Future<Item=i64, Error=RedisError>>;
fn incrby<K: Into<RedisKey>>(&self, key: K, incr: i64) -> Box<Future<Item=i64, Error=RedisError>>;
fn incrbyfloat<K: Into<RedisKey>>(&self, key: K, incr: f64) -> Box<Future<Item=f64, Error=RedisError>>;
fn ping(&self) -> Box<Future<Item=String, Error=RedisError>>;
fn auth<V: Into<String>>(&self, value: V) -> Box<Future<Item=String, Error=RedisError>>;
fn bgrewriteaof(&self) -> Box<Future<Item=String, Error=RedisError>>;
fn bgsave(&self) -> Box<Future<Item=String, Error=RedisError>>;
fn client_list(&self) -> Box<Future<Item=String, Error=RedisError>>;
fn client_getname(&self) -> Box<Future<Item=Option<String>, Error=RedisError>>;
fn client_setname<V: Into<String>>(&self, name: V) -> Box<Future<Item=Option<String>, Error=RedisError>>;
fn dbsize(&self) -> Box<Future<Item=usize, Error=RedisError>>;
fn dump<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Option<String>, Error=RedisError>>;
fn exists<K: Into<MultipleKeys>>(&self, keys: K) -> Box<Future<Item=usize, Error=RedisError>>;
fn expire<K: Into<RedisKey>>(&self, key: K, seconds: i64) -> Box<Future<Item=bool, Error=RedisError>>;
fn expire_at<K: Into<RedisKey>>(&self, key: K, timestamp: i64) -> Box<Future<Item=bool, Error=RedisError>>;
fn persist<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=bool, Error=RedisError>>;
fn flushdb(&self, _async: bool) -> Box<Future<Item=String, Error=RedisError>>;
fn getrange<K: Into<RedisKey>>(&self, key: K, start: usize, end: usize) -> Box<Future<Item=String, Error=RedisError>>;
fn getset<V: Into<RedisValue>, K: Into<RedisKey>>(&self, key: K, value: V) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>>;
fn hdel<F: Into<MultipleKeys>, K: Into<RedisKey>>(&self, key: K, fields: F) -> Box<Future<Item=usize, Error=RedisError>>;
fn hexists<F: Into<RedisKey>, K: Into<RedisKey>>(&self, key: K, field: F) -> Box<Future<Item=bool, Error=RedisError>>;
fn hget<F: Into<RedisKey>, K: Into<RedisKey>>(&self, key: K, field: F) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>>;
fn hgetall<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=HashMap<String, RedisValue>, Error=RedisError>>;
fn hincrby<F: Into<RedisKey>, K: Into<RedisKey>>(&self, key: K, field: F, incr: i64) -> Box<Future<Item=i64, Error=RedisError>>;
fn hincrbyfloat<K: Into<RedisKey>, F: Into<RedisKey>>(&self, key: K, field: F, incr: f64) -> Box<Future<Item=f64, Error=RedisError>>;
fn hkeys<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Vec<String>, Error=RedisError>>;
fn hlen<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=usize, Error=RedisError>>;
fn hmget<F: Into<MultipleKeys>, K: Into<RedisKey>>(&self, key: K, fields: F) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn hmset<V: Into<RedisValue>, F: Into<RedisKey> + Hash + Eq, K: Into<RedisKey>>(&self, key: K, mut values: HashMap<F, V>) -> Box<Future<Item=String, Error=RedisError>>;
fn hset<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, field: F, value: V) -> Box<Future<Item=usize, Error=RedisError>>;
fn hsetnx<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, field: F, value: V) -> Box<Future<Item=usize, Error=RedisError>>;
fn hstrlen<K: Into<RedisKey>, F: Into<RedisKey>>(&self, key: K, field: F) -> Box<Future<Item=usize, Error=RedisError>>;
fn hvals<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn llen<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=usize, Error=RedisError>>;
fn lpush<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=usize, Error=RedisError>>;
fn lpop<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>>;
fn sadd<K: Into<RedisKey>, V: Into<MultipleValues>>(&self, key: K, values: V) -> Box<Future<Item=usize, Error=RedisError>>;
fn srem<K: Into<RedisKey>, V: Into<MultipleValues>>(&self, key: K, values: V) -> Box<Future<Item=usize, Error=RedisError>>;
fn smembers<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn psubscribe<K: Into<MultipleKeys>>(&self, patterns: K) -> Box<Future<Item=Vec<usize>, Error=RedisError>>;
fn punsubscribe<K: Into<MultipleKeys>>(&self, patterns: K) -> Box<Future<Item=Vec<usize>, Error=RedisError>>;
fn mget<K: Into<MultipleKeys>>(&self, keys: K) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zadd<K: Into<RedisKey>, V: Into<MultipleZaddValues>>(&self, key: K, options: Option<SetOptions>, changed: bool, incr: bool, values: V) -> Box<Future<Item=RedisValue, Error=RedisError>>;
fn zcard<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=usize, Error=RedisError>>;
fn zcount<K: Into<RedisKey>>(&self, key: K, min: f64, max: f64) -> Box<Future<Item=usize, Error=RedisError>>;
fn zlexcount<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, min: M, max: N) -> Box<Future<Item=usize, Error=RedisError>>;
fn zincrby<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, incr: f64, value: V) -> Box<Future<Item=f64, Error=RedisError>>;
fn zrange<K: Into<RedisKey>>(&self, key: K, start: i64, stop: i64, with_scores: bool) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, min: M, max: N, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zrangebyscore<K: Into<RedisKey>>(&self, key: K, min: f64, max: f64, with_scores: bool, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zpopmax<K: Into<RedisKey>>(&self, key: K, count: Option<usize>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zpopmin<K: Into<RedisKey>>(&self, key: K, count: Option<usize>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zrank<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=RedisValue, Error=RedisError>>;
fn zrem<K: Into<RedisKey>, V: Into<MultipleValues>>(&self, key: K, values: V) -> Box<Future<Item=usize, Error=RedisError>>;
fn zremrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, min: M, max: N) -> Box<Future<Item=usize, Error=RedisError>>;
fn zremrangebyrank<K: Into<RedisKey>>(&self, key: K, start: i64, stop: i64) -> Box<Future<Item=usize, Error=RedisError>>;
fn zremrangebyscore<K: Into<RedisKey>>(&self, key: K, min: f64, max: f64) -> Box<Future<Item=usize, Error=RedisError>>;
fn zrevrange<K: Into<RedisKey>>(&self, key: K, start: i64, stop: i64, with_scores: bool) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zrevrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, max: M, min: N, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zrevrangebyscore<K: Into<RedisKey>>(&self, key: K, max: f64, min: f64, with_scores: bool, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>;
fn zrevrank<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=RedisValue, Error=RedisError>>;
fn zscore<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=RedisValue, Error=RedisError>>;
fn zinterstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(&self,
destination: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>)
-> Box<Future<Item=usize, Error=RedisError>>;
fn zunionstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(&self,
destination: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>)
-> Box<Future<Item=usize, Error=RedisError>>;
fn ttl<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=i64, Error=RedisError>>;
fn pttl<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=i64, Error=RedisError>>;
}
impl RedisClientBorrowed for RedisClient {
fn quit(&self) -> Box<Future<Item=(), Error=RedisError>> {
commands::quit(&self.inner)
}
fn flushall(&self, _async: bool) -> Box<Future<Item=String, Error=RedisError>> {
commands::flushall(&self.inner, _async)
}
fn set<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V, expire: Option<Expiration>, options: Option<SetOptions>) -> Box<Future<Item=bool, Error=RedisError>> {
commands::set(&self.inner, key, value, expire, options)
}
fn get<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>> {
commands::get(&self.inner, key)
}
fn select(&self, db: u8) -> Box<Future<Item=(), Error=RedisError>> {
commands::select(&self.inner, db)
}
fn info(&self, section: Option<InfoKind>) -> Box<Future<Item=String, Error=RedisError>> {
commands::info(&self.inner, section)
}
fn del<K: Into<MultipleKeys>>(&self, keys: K) -> Box<Future<Item=usize, Error=RedisError>> {
commands::del(&self.inner, keys)
}
fn subscribe<T: Into<String>>(&self, channel: T) -> Box<Future<Item=usize, Error=RedisError>> {
commands::subscribe(&self.inner, channel)
}
fn unsubscribe<T: Into<String>>(&self, channel: T) -> Box<Future<Item=usize, Error=RedisError>> {
commands::unsubscribe(&self.inner, channel)
}
fn publish<T: Into<String>, V: Into<RedisValue>>(&self, channel: T, message: V) -> Box<Future<Item=i64, Error=RedisError>> {
commands::publish(&self.inner, channel, message)
}
fn decr<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=i64, Error=RedisError>> {
commands::decr(&self.inner, key)
}
fn decrby<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=i64, Error=RedisError>> {
commands::decrby(&self.inner, key, value)
}
fn incr<K: Into<RedisKey>> (&self, key: K) -> Box<Future<Item=i64, Error=RedisError>> {
commands::incr(&self.inner, key)
}
fn incrby<K: Into<RedisKey>>(&self, key: K, incr: i64) -> Box<Future<Item=i64, Error=RedisError>> {
commands::incrby(&self.inner, key, incr)
}
fn incrbyfloat<K: Into<RedisKey>>(&self, key: K, incr: f64) -> Box<Future<Item=f64, Error=RedisError>> {
commands::incrbyfloat(&self.inner, key, incr)
}
fn ping(&self) -> Box<Future<Item=String, Error=RedisError>> {
commands::ping(&self.inner)
}
fn auth<V: Into<String>>(&self, value: V) -> Box<Future<Item=String, Error=RedisError>> {
commands::auth(&self.inner, value)
}
fn bgrewriteaof(&self) -> Box<Future<Item=String, Error=RedisError>> {
commands::bgrewriteaof(&self.inner)
}
fn bgsave(&self) -> Box<Future<Item=String, Error=RedisError>> {
commands::bgsave(&self.inner)
}
fn client_list(&self) -> Box<Future<Item=String, Error=RedisError>> {
commands::client_list(&self.inner)
}
fn client_getname(&self) -> Box<Future<Item=Option<String>, Error=RedisError>> {
commands::client_getname(&self.inner)
}
fn client_setname<V: Into<String>>(&self, name: V) -> Box<Future<Item=Option<String>, Error=RedisError>> {
commands::client_setname(&self.inner, name)
}
fn dbsize(&self) -> Box<Future<Item=usize, Error=RedisError>> {
commands::dbsize(&self.inner)
}
fn dump<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Option<String>, Error=RedisError>> {
commands::dump(&self.inner, key)
}
fn exists<K: Into<MultipleKeys>>(&self, keys: K) -> Box<Future<Item=usize, Error=RedisError>> {
commands::exists(&self.inner, keys)
}
fn expire<K: Into<RedisKey>>(&self, key: K, seconds: i64) -> Box<Future<Item=bool, Error=RedisError>> {
commands::expire(&self.inner, key, seconds)
}
fn expire_at<K: Into<RedisKey>>(&self, key: K, timestamp: i64) -> Box<Future<Item=bool, Error=RedisError>> {
commands::expire_at(&self.inner, key, timestamp)
}
fn persist<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=bool, Error=RedisError>>{
commands::persist(&self.inner, key)
}
fn flushdb(&self, _async: bool) -> Box<Future<Item=String, Error=RedisError>> {
commands::flushdb(&self.inner, _async)
}
fn getrange<K: Into<RedisKey>>(&self, key: K, start: usize, end: usize) -> Box<Future<Item=String, Error=RedisError>> {
commands::getrange(&self.inner, key, start, end)
}
fn getset<V: Into<RedisValue>, K: Into<RedisKey>>(&self, key: K, value: V) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>> {
commands::getset(&self.inner, key, value)
}
fn hdel<F: Into<MultipleKeys>, K: Into<RedisKey>>(&self, key: K, fields: F) -> Box<Future<Item=usize, Error=RedisError>> {
commands::hdel(&self.inner, key, fields)
}
fn hexists<F: Into<RedisKey>, K: Into<RedisKey>>(&self, key: K, field: F) -> Box<Future<Item=bool, Error=RedisError>> {
commands::hexists(&self.inner, key, field)
}
fn hget<F: Into<RedisKey>, K: Into<RedisKey>>(&self, key: K, field: F) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>> {
commands::hget(&self.inner, key, field)
}
fn hgetall<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=HashMap<String, RedisValue>, Error=RedisError>> {
commands::hgetall(&self.inner, key)
}
fn hincrby<F: Into<RedisKey>, K: Into<RedisKey>>(&self, key: K, field: F, incr: i64) -> Box<Future<Item=i64, Error=RedisError>> {
commands::hincrby(&self.inner, key, field, incr)
}
fn hincrbyfloat<K: Into<RedisKey>, F: Into<RedisKey>>(&self, key: K, field: F, incr: f64) -> Box<Future<Item=f64, Error=RedisError>> {
commands::hincrbyfloat(&self.inner, key, field, incr)
}
fn hkeys<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Vec<String>, Error=RedisError>> {
commands::hkeys(&self.inner, key)
}
fn hlen<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=usize, Error=RedisError>> {
commands::hlen(&self.inner, key)
}
fn hmget<F: Into<MultipleKeys>, K: Into<RedisKey>>(&self, key: K, fields: F) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::hmget(&self.inner, key, fields)
}
fn hmset<V: Into<RedisValue>, F: Into<RedisKey> + Hash + Eq, K: Into<RedisKey>>(&self, key: K, mut values: HashMap<F, V>) -> Box<Future<Item=String, Error=RedisError>> {
commands::hmset(&self.inner, key, values)
}
fn hset<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, field: F, value: V) -> Box<Future<Item=usize, Error=RedisError>> {
commands::hset(&self.inner, key, field, value)
}
fn hsetnx<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, field: F, value: V) -> Box<Future<Item=usize, Error=RedisError>> {
commands::hsetnx(&self.inner, key, field, value)
}
fn hstrlen<K: Into<RedisKey>, F: Into<RedisKey>>(&self, key: K, field: F) -> Box<Future<Item=usize, Error=RedisError>> {
commands::hstrlen(&self.inner, key, field)
}
fn hvals<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::hvals(&self.inner, key)
}
fn llen<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=usize, Error=RedisError>> {
commands::llen(&self.inner, key)
}
fn lpush<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=usize, Error=RedisError>> {
commands::lpush(&self.inner, key, value)
}
fn lpop<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Option<RedisValue>, Error=RedisError>> {
commands::lpop(&self.inner, key)
}
fn sadd<K: Into<RedisKey>, V: Into<MultipleValues>>(&self, key: K, values: V) -> Box<Future<Item=usize, Error=RedisError>> {
commands::sadd(&self.inner, key, values)
}
fn srem<K: Into<RedisKey>, V: Into<MultipleValues>>(&self, key: K, values: V) -> Box<Future<Item=usize, Error=RedisError>> {
commands::srem(&self.inner, key, values)
}
fn smembers<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::smembers(&self.inner, key)
}
fn psubscribe<K: Into<MultipleKeys>>(&self, patterns: K) -> Box<Future<Item=Vec<usize>, Error=RedisError>> {
commands::psubscribe(&self.inner, patterns)
}
fn punsubscribe<K: Into<MultipleKeys>>(&self, patterns: K) -> Box<Future<Item=Vec<usize>, Error=RedisError>> {
commands::punsubscribe(&self.inner, patterns)
}
fn mget<K: Into<MultipleKeys>>(&self, keys: K) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::mget(&self.inner, keys)
}
fn zadd<K: Into<RedisKey>, V: Into<MultipleZaddValues>>(&self, key: K, options: Option<SetOptions>, changed: bool, incr: bool, values: V) -> Box<Future<Item=RedisValue, Error=RedisError>> {
commands::zadd(&self.inner, key, options, changed, incr, values)
}
fn zcard<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zcard(&self.inner, key)
}
fn zcount<K: Into<RedisKey>>(&self, key: K, min: f64, max: f64) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zcount(&self.inner, key, min, max)
}
fn zlexcount<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, min: M, max: N) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zlexcount(&self.inner, key, min, max)
}
fn zincrby<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, incr: f64, value: V) -> Box<Future<Item=f64, Error=RedisError>> {
commands::zincrby(&self.inner, key, incr, value)
}
fn zrange<K: Into<RedisKey>>(&self, key: K, start: i64, stop: i64, with_scores: bool) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zrange(&self.inner, key, start, stop, with_scores)
}
fn zrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, min: M, max: N, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zrangebylex(&self.inner, key, min, max, limit)
}
fn zrangebyscore<K: Into<RedisKey>>(&self, key: K, min: f64, max: f64, with_scores: bool, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zrangebyscore(&self.inner, key, min, max, with_scores, limit)
}
fn zpopmax<K: Into<RedisKey>>(&self, key: K, count: Option<usize>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zpopmax(&self.inner, key, count)
}
fn zpopmin<K: Into<RedisKey>>(&self, key: K, count: Option<usize>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zpopmin(&self.inner, key, count)
}
fn zrank<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=RedisValue, Error=RedisError>> {
commands::zrank(&self.inner, key, value)
}
fn zrem<K: Into<RedisKey>, V: Into<MultipleValues>>(&self, key: K, values: V) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zrem(&self.inner, key, values)
}
fn zremrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, min: M, max: N) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zremrangebylex(&self.inner, key, min, max)
}
fn zremrangebyrank<K: Into<RedisKey>>(&self, key: K, start: i64, stop: i64) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zremrangebyrank(&self.inner, key, start, stop)
}
fn zremrangebyscore<K: Into<RedisKey>>(&self, key: K, min: f64, max: f64) -> Box<Future<Item=usize, Error=RedisError>> {
commands::zremrangebyscore(&self.inner, key, min, max)
}
fn zrevrange<K: Into<RedisKey>>(&self, key: K, start: i64, stop: i64, with_scores: bool) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zrevrange(&self.inner, key, start, stop, with_scores)
}
fn zrevrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(&self, key: K, max: M, min: N, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zrevrangebylex(&self.inner, key, max, min, limit)
}
fn zrevrangebyscore<K: Into<RedisKey>>(&self, key: K, max: f64, min: f64, with_scores: bool, limit: Option<(usize, usize)>) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> {
commands::zrevrangebyscore(&self.inner, key, max, min, with_scores, limit)
}
fn zrevrank<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=RedisValue, Error=RedisError>> {
commands::zrevrank(&self.inner, key, value)
}
fn zscore<K: Into<RedisKey>, V: Into<RedisValue>>(&self, key: K, value: V) -> Box<Future<Item=RedisValue, Error=RedisError>> {
commands::zscore(&self.inner, key, value)
}
fn zinterstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(&self,
destination: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>)
-> Box<Future<Item=usize, Error=RedisError>>
{
commands::zinterstore(&self.inner, destination, keys, weights, aggregate)
}
fn zunionstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(&self,
destination: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>)
-> Box<Future<Item=usize, Error=RedisError>>
{
commands::zunionstore(&self.inner, destination, keys, weights, aggregate)
}
fn ttl<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=i64, Error=RedisError>> {
commands::ttl(&self.inner, key)
}
fn pttl<K: Into<RedisKey>>(&self, key: K) -> Box<Future<Item=i64, Error=RedisError>> {
commands::pttl(&self.inner, key)
}
}