Struct redis_client::commands::RedisCommand [] [src]

pub struct RedisCommand { /* fields omitted */ }

A RedisCommand purpose is to build redis commands. It can contains one or more commands for pipelining

Example:

let cmd = &mut redis_client::RedisCommand::new();
cmd.set("key", "value2").get("key");

or its equivalent:

let cmd = &mut redis_client::RedisCommand::new();
cmd.add_cmd("SET").add_arg("key").add_arg("value2").end().add_cmd("GET").add_arg("key").end();

Methods

impl RedisCommand
[src]

Add a string representing the command (APPEND, GET, SET...) to the command. (Each command should start with this method)

Add a whitespace and a string to the commands

Add a whitespace and a string for each one of the vector's items to the commands

Add a whitespace a key another whitespace and the value for each pair of the hash map to the curent command

Add a whitespace and then an array of byte to the command

Teminate a command

Get the number of commands in the RedisCommand object

Trait Implementations

impl CommandBuilder for RedisCommand
[src]