Trait rsmc_core::client::Connection [−][src]
A connection is an async interface to memcached, which requires a concrete implementation using an underlying async runtime (e.g. tokio or async-std.)
Required methods
#[must_use]fn connect<'async_trait>(
url: String
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
url: String
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
Connect to a memcached server over TCP.
#[must_use]fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
buf: &'life1 mut Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Read to fill the incoming buffer.
#[must_use]fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Write an entire buffer to the TCP stream.
Provided methods
#[must_use]fn read_packet<'life0, 'async_trait, P: Compressor>(
&'life0 mut self,
compressor: P
) -> Pin<Box<dyn Future<Output = Result<Packet, Error>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
compressor: P
) -> Pin<Box<dyn Future<Output = Result<Packet, Error>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Read a packet response, possibly decompressing it. It is most likely unnecessary to implement this yourself.
#[must_use]fn write_packet<'life0, 'async_trait, P: Compressor>(
&'life0 mut self,
compressor: P,
packet: Packet
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
compressor: P,
packet: Packet
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
P: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Write a packet request, possibly compressing it. It is most likely unnecessary to implement this yourself.