Trait reool::RedisOps[][src]

pub trait RedisOps: Sized + ConnectionLike + Send + 'static {
    fn query<'a, T>(&'a mut self, cmd: &'a Cmd) -> RedisFuture<'a, T>
    where
        T: FromRedisValue + Send + 'static
, { ... }
fn execute<'a, T>(&'a mut self, cmd: &'a Cmd) -> RedisFuture<'a, ()>
    where
        T: FromRedisValue + Send + 'static
, { ... }
fn ping<'a>(&'a mut self) -> RedisFuture<'a, Duration> { ... }
fn flushall<'a>(&'a mut self) -> RedisFuture<'a, ()> { ... }
fn flushall_async<'a>(&'a mut self) -> RedisFuture<'a, ()> { ... }
fn quit<'a>(&'a mut self) -> RedisFuture<'a, ()> { ... }
fn client_id<'a>(&'a mut self) -> RedisFuture<'_, i64> { ... }
fn client_kill_id<'a>(&'a mut self, id: i64) -> RedisFuture<'_, ()> { ... }
fn db_size<'a>(&'a mut self) -> RedisFuture<'_, i64> { ... } }
Expand description

A helper trait to easily execute common asynchronous Redis operations on a redis::aio::ConnectionLike

Provided methods

Execute a command and expect a result

Execute a command and do not expect a result and instead just check whether the command did not fail

Send a ping command and return the roundrip time if successful

Delete all the keys of all the existing databases, not just the currently selected one. This command never fails.

The time-complexity for this operation is O(N), N being the number of keys in all existing databases.

Delete all the keys of all the existing databases

Redis (since 4.0,0) is now able to delete keys in the background in a different thread without blocking the server. An ASYNC option was added to FLUSHALL and FLUSHDB in order to let the entire dataset or a single database to be freed asynchronously.

Asynchronous FLUSHALL and FLUSHDB commands only delete keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.

Ask the server to close the connection.

The connection is closed as soon as all pending replies have been written to the client.

Determine the number of keys.

Implementors