Struct redis::aio::MultiplexedConnection
source · [−]pub struct MultiplexedConnection { /* private fields */ }
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
sourceimpl MultiplexedConnection
impl MultiplexedConnection
sourcepub async fn new<C>(
connection_info: &ConnectionInfo,
stream: C
) -> RedisResult<(Self, impl Future<Output = ()>)> where
C: Unpin + AsyncRead + AsyncWrite + Send + 'static,
pub async fn new<C>(
connection_info: &ConnectionInfo,
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
sourceimpl Clone for MultiplexedConnection
impl Clone for MultiplexedConnection
sourcefn clone(&self) -> MultiplexedConnection
fn clone(&self) -> MultiplexedConnection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConnectionLike for MultiplexedConnection
impl ConnectionLike for MultiplexedConnection
sourcefn 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. Read more
sourcefn 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. Read more
Auto Trait Implementations
impl !RefUnwindSafe for MultiplexedConnection
impl Send for MultiplexedConnection
impl Sync for MultiplexedConnection
impl Unpin for MultiplexedConnection
impl !UnwindSafe for MultiplexedConnection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more