Struct redis_client::commands::RedisCommand
[−]
[src]
pub struct RedisCommand { // some fields omitted }
Methods
impl RedisCommand
[src]
fn new() -> RedisCommand
fn add_cmd<C>(&mut self, command: C) -> &mut RedisCommand where C: ToString
Add a string representing the command (APPEND, GET, SET...) to the command. (Each command should start with this method)
fn add_arg<A>(&mut self, arg: A) -> &mut RedisCommand where A: ToString
Add a whitespace and a string to the commands
fn add_args<A>(&mut self, args: Vec<A>) -> &mut RedisCommand where A: ToString
Add a whitespace and a string for each one of the vector's items to the commands
fn add_arg_map<F: ToString>(&mut self, args: HashMap<String, F>) -> &mut RedisCommand
Add a whitespace a key another whitespace and the value for each pair of the hash map to the curent command
fn add_binary_arg(&mut self, arg: &[u8]) -> &mut RedisCommand
Add a whitespace and then an array of byte to the command
fn end(&mut self) -> &mut RedisCommand
Teminate a command
fn get_command_nb(&self) -> usize
Get the number of commands in the RedisCommand object