Trait redis::aio::ConnectionLike[][src]

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; }
This is supported on crate feature aio only.

An async abstraction over connections.

Required methods

fn req_packed_command<'a>(&'a mut self, cmd: &'a Cmd) -> RedisFuture<'a, Value>[src]

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>>
[src]

Sends multiple already encoded (packed) command into the TCP socket and reads count responses from it. This is used to implement pipelining.

fn get_db(&self) -> i64[src]

Returns the database this connection is bound to. Note that this information might be unreliable because it's initially cached and also might be incorrect if the connection like object is not actually connected.

Loading content...

Implementors

impl ConnectionLike for ConnectionManager[src]

impl ConnectionLike for MultiplexedConnection[src]

impl<C> ConnectionLike for Connection<C> where
    C: Unpin + AsyncRead + AsyncWrite + Send
[src]

Loading content...