[−][src]Trait reool::Commands
A helper trait to easily execute common
asynchronous Redis commands on a
redis::async::ConnectionLike
Provided methods
fn query<T>(self, cmd: &Cmd) -> RedisFuture<(Self, T)> where
T: FromRedisValue + Send + 'static,
T: FromRedisValue + Send + 'static,
Execute a command and expect a result
fn execute<T>(self, cmd: &Cmd) -> RedisFuture<(Self, ())> where
T: FromRedisValue + Send + 'static,
T: FromRedisValue + Send + 'static,
Execute a command and do not expect a result and instead just check whether the command did not fail
fn ping(self) -> RedisFuture<(Self, ())>
Send a ping command.
fn keys<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
self,
key: K
) -> RedisFuture<(Self, RV)>
Gets all keys matching pattern
fn get<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
self,
key: K
) -> RedisFuture<(Self, RV)>
Get the value of a key. If key is a vec this becomes an MGET
.
fn set<K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K,
value: V
) -> RedisFuture<(Self, RV)>
self,
key: K,
value: V
) -> RedisFuture<(Self, RV)>
Set the string value of a key.
fn set_multiple<K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
items: &[(K, V)]
) -> RedisFuture<(Self, RV)>
self,
items: &[(K, V)]
) -> RedisFuture<(Self, RV)>
Sets multiple keys to their values.
fn del<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
self,
key: K
) -> RedisFuture<(Self, RV)>
Delete one or more keys.
fn exists<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
self,
key: K
) -> RedisFuture<(Self, RV)>
Determine if a key exists.
Implementors
impl<T> Commands for T where
T: ConnectionLike + Sized + Send + 'static,
[src]
T: ConnectionLike + Sized + Send + 'static,
fn query<T>(self, cmd: &Cmd) -> RedisFuture<(Self, T)> where
T: FromRedisValue + Send + 'static,
[src]
T: FromRedisValue + Send + 'static,
fn execute<T>(self, cmd: &Cmd) -> RedisFuture<(Self, ())> where
T: FromRedisValue + Send + 'static,
[src]
T: FromRedisValue + Send + 'static,
fn ping(self) -> RedisFuture<(Self, ())>
[src]
fn keys<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
[src]
self,
key: K
) -> RedisFuture<(Self, RV)>
fn get<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
[src]
self,
key: K
) -> RedisFuture<(Self, RV)>
fn set<K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K,
value: V
) -> RedisFuture<(Self, RV)>
[src]
self,
key: K,
value: V
) -> RedisFuture<(Self, RV)>
fn set_multiple<K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
items: &[(K, V)]
) -> RedisFuture<(Self, RV)>
[src]
self,
items: &[(K, V)]
) -> RedisFuture<(Self, RV)>
fn del<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
[src]
self,
key: K
) -> RedisFuture<(Self, RV)>
fn exists<K: ToRedisArgs, RV: FromRedisValue + Send + 'static>(
self,
key: K
) -> RedisFuture<(Self, RV)>
[src]
self,
key: K
) -> RedisFuture<(Self, RV)>