Struct redis::aio::MultiplexedConnection
source · pub struct MultiplexedConnection { /* private fields */ }
Available on crate feature
aio
only.Expand description
A connection object which can be cloned, allowing requests to be be sent concurrently on the same underlying connection (tcp/unix socket).
Implementations§
source§impl MultiplexedConnection
impl MultiplexedConnection
sourcepub async fn new<C>(
connection_info: &RedisConnectionInfo,
stream: C
) -> RedisResult<(Self, impl Future<Output = ()>)>where
C: Unpin + AsyncRead + AsyncWrite + Send + 'static,
pub async fn new<C>(
connection_info: &RedisConnectionInfo,
stream: C
) -> RedisResult<(Self, impl Future<Output = ()>)>where
C: Unpin + AsyncRead + AsyncWrite + Send + 'static,
Constructs a new MultiplexedConnection
out of a AsyncRead + AsyncWrite
object
and a ConnectionInfo
Trait Implementations§
source§impl Clone for MultiplexedConnection
impl Clone for MultiplexedConnection
source§fn clone(&self) -> MultiplexedConnection
fn clone(&self) -> MultiplexedConnection
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ConnectionLike for MultiplexedConnection
impl ConnectionLike for MultiplexedConnection
source§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.
source§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.