Trait redis::aio::ConnectionLike
source · [−]pub trait ConnectionLike {
fn req_packed_command<'a>(
&'a mut self,
cmd: &'a Cmd
) -> RedisFuture<'a, Value>;
fn req_packed_commands<'a>(
&'a mut self,
cmd: &'a Pipeline,
offset: usize,
count: usize
) -> RedisFuture<'a, Vec<Value>>;
fn get_db(&self) -> i64;
}
Expand description
An async abstraction over connections.
Required Methods
fn req_packed_command<'a>(&'a mut self, cmd: &'a Cmd) -> RedisFuture<'a, Value>
fn req_packed_command<'a>(&'a mut self, cmd: &'a Cmd) -> RedisFuture<'a, Value>
Sends an already encoded (packed) command into the TCP socket and reads the single response from it.
fn req_packed_commands<'a>(
&'a mut self,
cmd: &'a Pipeline,
offset: usize,
count: usize
) -> RedisFuture<'a, Vec<Value>>
fn req_packed_commands<'a>(
&'a mut self,
cmd: &'a Pipeline,
offset: usize,
count: usize
) -> RedisFuture<'a, Vec<Value>>
Sends multiple already encoded (packed) command into the TCP socket
and reads count
responses from it. This is used to implement
pipelining.