Trait redis_client::commands::CommandBuilder
[−]
[src]
pub trait CommandBuilder { fn append<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn auth<P: ToString>(&mut self, password: P) -> &mut RedisCommand; fn bgrewriteaof(&mut self) -> &mut RedisCommand; fn bgsave(&mut self) -> &mut RedisCommand; fn bitcount<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn bitcount_range<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand; fn blpop<K: ToString>(&mut self, key: K, timeout: u32) -> &mut RedisCommand; fn mblpop<K: ToString>(&mut self, keys: Vec<K>, timeout: u32) -> &mut RedisCommand; fn brpop<K: ToString>(&mut self, key: K, timeout: u32) -> &mut RedisCommand; fn mbrpop<K: ToString>(&mut self, keys: Vec<K>, timeout: u32) -> &mut RedisCommand; fn brpoplpush<S: ToString, D: ToString>(&mut self, source: S, dest: D, timeout: u32) -> &mut RedisCommand; fn decr<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn decrby<K: ToString>(&mut self, key: K, increment: i64) -> &mut RedisCommand; fn del<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn mdel<K: ToString>(&mut self, keys: Vec<K>) -> &mut RedisCommand; fn discard(&mut self) -> &mut RedisCommand; fn echo<K: ToString>(&mut self, msg: K) -> &mut RedisCommand; fn exec(&mut self) -> &mut RedisCommand; fn exists<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn mexists<K: ToString>(&mut self, keys: Vec<K>) -> &mut RedisCommand; fn expire<K: ToString>(&mut self, key: K, expiry: i64) -> &mut RedisCommand; fn expireat<K: ToString>(&mut self, key: K, timestamp: i64) -> &mut RedisCommand; fn get<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn getrange<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand; fn hdel<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand; fn hmdel<K: ToString, V: ToString>(&mut self, key: K, fields: Vec<V>) -> &mut RedisCommand; fn hexists<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand; fn hget<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand; fn hgetall<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn hincrby<K: ToString, F: ToString>(&mut self, key: K, field: F, increment: i64) -> &mut RedisCommand; fn hincrbyfloat<K: ToString, F: ToString>(&mut self, key: K, field: F, increment: f64) -> &mut RedisCommand; fn hkeys<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn hlen<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn hmget<K: ToString, F: ToString>(&mut self, key: K, fields: Vec<F>) -> &mut RedisCommand; fn hmset<K: ToString>(&mut self, key: K, fields: HashMap<String, K>) -> &mut RedisCommand; fn hset<K: ToString, F: ToString, V: ToString>(&mut self, key: K, field: F, value: V) -> &mut RedisCommand; fn hstrlen<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand; fn hsetnx<K: ToString, F: ToString, V: ToString>(&mut self, key: K, field: F, value: V) -> &mut RedisCommand; fn hvals<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn lindex<K: ToString>(&mut self, key: K, index: i32) -> &mut RedisCommand; fn linsert_after<K: ToString, P: ToString, V: ToString>(&mut self, key: K, pivot: P, value: V) -> &mut RedisCommand; fn linsert_before<K: ToString, P: ToString, V: ToString>(&mut self, key: K, pivot: P, value: V) -> &mut RedisCommand; fn llen<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn lpop<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn lpush<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn mlpush<K: ToString, V: ToString>(&mut self, key: K, values: Vec<V>) -> &mut RedisCommand; fn lpushx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn lrange<K: ToString>(&mut self, key: K, start: i32, end: i32) -> &mut RedisCommand; fn lrem<K: ToString, V: ToString>(&mut self, key: K, count: i32, value: V) -> &mut RedisCommand; fn lset<K: ToString, V: ToString>(&mut self, key: K, index: i32, value: V) -> &mut RedisCommand; fn ltrim<K: ToString>(&mut self, key: K, start: i32, end: i32) -> &mut RedisCommand; fn multi(&mut self) -> &mut RedisCommand; fn rename<K: ToString, N: ToString>(&mut self, key: K, new_key: N) -> &mut RedisCommand; fn renamenx<K: ToString, N: ToString>(&mut self, key: K, new_key: N) -> &mut RedisCommand; fn rpop<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn rpoplpush<S: ToString, D: ToString>(&mut self, source: S, dest: D) -> &mut RedisCommand; fn rpush<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn mrpush<K: ToString, V: ToString>(&mut self, key: K, values: Vec<V>) -> &mut RedisCommand; fn rpushx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn sadd<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand; fn msadd<K: ToString, M: ToString>(&mut self, key: K, members: Vec<M>) -> &mut RedisCommand; fn sadd_binary<K: ToString>(&mut self, key: K, member: &[u8]) -> &mut RedisCommand; fn scard<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn select(&mut self, db_index: i32) -> &mut RedisCommand; fn set<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn set_binary<K: ToString>(&mut self, key: K, value: &[u8]) -> &mut RedisCommand; fn setex<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand; fn psetex<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand; fn setnx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn setxx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand; fn setex_nx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand; fn setex_xx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand; fn psetex_nx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand; fn psetex_xx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand; fn setbit<K: ToString>(&mut self, key: K, offset: u32, bit: u8) -> &mut RedisCommand; fn setrange<K: ToString, V: ToString>(&mut self, key: K, offset: u32, value: V) -> &mut RedisCommand; fn sismember<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand; fn smembers<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn spop<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn spop_count<K: ToString>(&mut self, key: K, count: u32) -> &mut RedisCommand; fn srem<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand; fn msrem<K: ToString, M: ToString>(&mut self, key: K, members: Vec<M>) -> &mut RedisCommand; fn strlen<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn ttl<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn unwatch(&mut self) -> &mut RedisCommand; fn watch<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn mwatch<K: ToString>(&mut self, keys: Vec<K>) -> &mut RedisCommand; fn zadd<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand; fn zadd_binary<K: ToString>(&mut self, key: K, score: f64, member: &[u8]) -> &mut RedisCommand; fn zaddnx<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand; fn zaddxx<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand; fn zaddnx_ch<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand; fn zaddxx_ch<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand; fn zcard<K: ToString>(&mut self, key: K) -> &mut RedisCommand; fn zcount<K: ToString, S: ToString, E: ToString>(&mut self, key: K, start_range: S, end_range: E) -> &mut RedisCommand; fn zincrby<K: ToString, V: ToString>(&mut self, key: K, increment: f64, member: V) -> &mut RedisCommand; fn zlexcount<K: ToString, S: ToString, E: ToString>(&mut self, key: K, min: S, max: E) -> &mut RedisCommand; fn zrem<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand; fn mzrem<K: ToString, M: ToString>(&mut self, key: K, members: Vec<M>) -> &mut RedisCommand; fn zrange<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand; fn zrange_with_scores<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand; fn zrevrange<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand; fn zrevrange_with_scores<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand; }
The trait CommandBuilder implements methods to abstract the construction of redis commands.
So we can use:
let cmd = &mut redis_client::RedisCommand::new(); cmd.set("key", "value2");
Instead of:
let cmd = &mut redis_client::RedisCommand::new(); cmd.add_cmd("SET").add_arg("key").add_arg("value2").end();
Required Methods
fn append<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn auth<P: ToString>(&mut self, password: P) -> &mut RedisCommand
fn bgrewriteaof(&mut self) -> &mut RedisCommand
fn bgsave(&mut self) -> &mut RedisCommand
fn bitcount<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn bitcount_range<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand
fn blpop<K: ToString>(&mut self, key: K, timeout: u32) -> &mut RedisCommand
fn mblpop<K: ToString>(&mut self, keys: Vec<K>, timeout: u32) -> &mut RedisCommand
fn brpop<K: ToString>(&mut self, key: K, timeout: u32) -> &mut RedisCommand
fn mbrpop<K: ToString>(&mut self, keys: Vec<K>, timeout: u32) -> &mut RedisCommand
fn brpoplpush<S: ToString, D: ToString>(&mut self, source: S, dest: D, timeout: u32) -> &mut RedisCommand
fn decr<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn decrby<K: ToString>(&mut self, key: K, increment: i64) -> &mut RedisCommand
fn del<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn mdel<K: ToString>(&mut self, keys: Vec<K>) -> &mut RedisCommand
fn discard(&mut self) -> &mut RedisCommand
fn echo<K: ToString>(&mut self, msg: K) -> &mut RedisCommand
fn exec(&mut self) -> &mut RedisCommand
fn exists<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn mexists<K: ToString>(&mut self, keys: Vec<K>) -> &mut RedisCommand
fn expire<K: ToString>(&mut self, key: K, expiry: i64) -> &mut RedisCommand
fn expireat<K: ToString>(&mut self, key: K, timestamp: i64) -> &mut RedisCommand
fn get<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn getrange<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand
fn hdel<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand
fn hmdel<K: ToString, V: ToString>(&mut self, key: K, fields: Vec<V>) -> &mut RedisCommand
fn hexists<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand
fn hget<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand
fn hgetall<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn hincrby<K: ToString, F: ToString>(&mut self, key: K, field: F, increment: i64) -> &mut RedisCommand
fn hincrbyfloat<K: ToString, F: ToString>(&mut self, key: K, field: F, increment: f64) -> &mut RedisCommand
fn hkeys<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn hlen<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn hmget<K: ToString, F: ToString>(&mut self, key: K, fields: Vec<F>) -> &mut RedisCommand
fn hmset<K: ToString>(&mut self, key: K, fields: HashMap<String, K>) -> &mut RedisCommand
fn hset<K: ToString, F: ToString, V: ToString>(&mut self, key: K, field: F, value: V) -> &mut RedisCommand
fn hstrlen<K: ToString, F: ToString>(&mut self, key: K, field: F) -> &mut RedisCommand
fn hsetnx<K: ToString, F: ToString, V: ToString>(&mut self, key: K, field: F, value: V) -> &mut RedisCommand
fn hvals<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn lindex<K: ToString>(&mut self, key: K, index: i32) -> &mut RedisCommand
fn linsert_after<K: ToString, P: ToString, V: ToString>(&mut self, key: K, pivot: P, value: V) -> &mut RedisCommand
fn linsert_before<K: ToString, P: ToString, V: ToString>(&mut self, key: K, pivot: P, value: V) -> &mut RedisCommand
fn llen<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn lpop<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn lpush<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn mlpush<K: ToString, V: ToString>(&mut self, key: K, values: Vec<V>) -> &mut RedisCommand
fn lpushx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn lrange<K: ToString>(&mut self, key: K, start: i32, end: i32) -> &mut RedisCommand
fn lrem<K: ToString, V: ToString>(&mut self, key: K, count: i32, value: V) -> &mut RedisCommand
fn lset<K: ToString, V: ToString>(&mut self, key: K, index: i32, value: V) -> &mut RedisCommand
fn ltrim<K: ToString>(&mut self, key: K, start: i32, end: i32) -> &mut RedisCommand
fn multi(&mut self) -> &mut RedisCommand
fn rename<K: ToString, N: ToString>(&mut self, key: K, new_key: N) -> &mut RedisCommand
fn renamenx<K: ToString, N: ToString>(&mut self, key: K, new_key: N) -> &mut RedisCommand
fn rpop<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn rpoplpush<S: ToString, D: ToString>(&mut self, source: S, dest: D) -> &mut RedisCommand
fn rpush<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn mrpush<K: ToString, V: ToString>(&mut self, key: K, values: Vec<V>) -> &mut RedisCommand
fn rpushx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn sadd<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand
fn msadd<K: ToString, M: ToString>(&mut self, key: K, members: Vec<M>) -> &mut RedisCommand
fn sadd_binary<K: ToString>(&mut self, key: K, member: &[u8]) -> &mut RedisCommand
fn scard<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn select(&mut self, db_index: i32) -> &mut RedisCommand
fn set<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn set_binary<K: ToString>(&mut self, key: K, value: &[u8]) -> &mut RedisCommand
fn setex<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand
fn psetex<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand
fn setnx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn setxx<K: ToString, V: ToString>(&mut self, key: K, value: V) -> &mut RedisCommand
fn setex_nx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand
fn setex_xx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand
fn psetex_nx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand
fn psetex_xx<K: ToString, V: ToString>(&mut self, key: K, value: V, expiry: i64) -> &mut RedisCommand
fn setbit<K: ToString>(&mut self, key: K, offset: u32, bit: u8) -> &mut RedisCommand
fn setrange<K: ToString, V: ToString>(&mut self, key: K, offset: u32, value: V) -> &mut RedisCommand
fn sismember<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand
fn smembers<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn spop<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn spop_count<K: ToString>(&mut self, key: K, count: u32) -> &mut RedisCommand
fn srem<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand
fn msrem<K: ToString, M: ToString>(&mut self, key: K, members: Vec<M>) -> &mut RedisCommand
fn strlen<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn ttl<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn unwatch(&mut self) -> &mut RedisCommand
fn watch<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn mwatch<K: ToString>(&mut self, keys: Vec<K>) -> &mut RedisCommand
fn zadd<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand
fn zadd_binary<K: ToString>(&mut self, key: K, score: f64, member: &[u8]) -> &mut RedisCommand
fn zaddnx<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand
fn zaddxx<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand
fn zaddnx_ch<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand
fn zaddxx_ch<K: ToString, V: ToString>(&mut self, key: K, score: f64, member: V) -> &mut RedisCommand
fn zcard<K: ToString>(&mut self, key: K) -> &mut RedisCommand
fn zcount<K: ToString, S: ToString, E: ToString>(&mut self, key: K, start_range: S, end_range: E) -> &mut RedisCommand
fn zincrby<K: ToString, V: ToString>(&mut self, key: K, increment: f64, member: V) -> &mut RedisCommand
fn zlexcount<K: ToString, S: ToString, E: ToString>(&mut self, key: K, min: S, max: E) -> &mut RedisCommand
fn zrem<K: ToString, M: ToString>(&mut self, key: K, member: M) -> &mut RedisCommand
fn mzrem<K: ToString, M: ToString>(&mut self, key: K, members: Vec<M>) -> &mut RedisCommand
fn zrange<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand
fn zrange_with_scores<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand
fn zrevrange<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand
fn zrevrange_with_scores<K: ToString>(&mut self, key: K, start_range: i64, end_range: i64) -> &mut RedisCommand
Implementors
impl CommandBuilder for RedisCommand