Struct redis::aio::Connection [−][src]
pub struct Connection<C = Pin<Box<dyn AsyncStream + Send + Sync>>> { /* fields omitted */ }
This is supported on crate feature
aio
only.Expand description
Represents a stateful redis TCP connection.
Implementations
Constructs a new Connection
out of a AsyncRead + AsyncWrite
object
and a RedisConnectionInfo
Converts this Connection
into PubSub
.
Converts this Connection
into Monitor
pub async fn new_async_std(
connection_info: &RedisConnectionInfo,
con: C
) -> RedisResult<Self>
This is supported on crate feature async-std-comp
only.
pub async fn new_async_std(
connection_info: &RedisConnectionInfo,
con: C
) -> RedisResult<Self>
This is supported on crate feature
async-std-comp
only.Constructs a new Connection
out of a async_std::io::AsyncRead + async_std::io::AsyncWrite
object
and a RedisConnectionInfo
Trait Implementations
Sends an already encoded (packed) command into the TCP socket and reads the single response from it. Read more
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. Read more
Auto Trait Implementations
impl<C = Pin<Box<dyn AsyncStream + Sync + Send + 'static, Global>>> !RefUnwindSafe for Connection<C>
impl<C> Send for Connection<C> where
C: Send,
impl<C> Sync for Connection<C> where
C: Sync,
impl<C> Unpin for Connection<C> where
C: Unpin,
impl<C = Pin<Box<dyn AsyncStream + Sync + Send + 'static, Global>>> !UnwindSafe for Connection<C>