Struct mtop_client::PooledMemcached
source · pub struct PooledMemcached { /* private fields */ }Methods from Deref<Target = Memcached>§
sourcepub async fn stats(&mut self) -> Result<Stats, MtopError>
pub async fn stats(&mut self) -> Result<Stats, MtopError>
Get a Stats object with the current values of the interesting stats for the server.
sourcepub async fn slabs(&mut self) -> Result<Slabs, MtopError>
pub async fn slabs(&mut self) -> Result<Slabs, MtopError>
Get a Slabs object with information about each set of Slabs maintained by
the Memcached server. You can think of each Slab as a class of objects that
are stored together in memory. Note that Slab IDs may not be contiguous based
on the size of items actually stored by the server.
sourcepub async fn items(&mut self) -> Result<SlabItems, MtopError>
pub async fn items(&mut self) -> Result<SlabItems, MtopError>
Get a SlabsItems object with information about the SlabItem items stored in
each slab class maintained by the Memcached server. The ID of each SlabItem
corresponds to a Slab maintained by the server. Note that SlabItem IDs may
not be contiguous based on the size of items actually stored by the server.
sourcepub async fn metas(&mut self) -> Result<Vec<Meta>, MtopError>
pub async fn metas(&mut self) -> Result<Vec<Meta>, MtopError>
Get a Meta object for every item in the cache which includes its key and expiration
time as a UNIX timestamp. Expiration time will be -1 if the item was set with an
infinite TTL.
sourcepub async fn get(
&mut self,
keys: &[String]
) -> Result<HashMap<String, Value>, MtopError>
pub async fn get( &mut self, keys: &[String] ) -> Result<HashMap<String, Value>, MtopError>
Get a map of the requested keys and their corresponding Value in the cache
including the key, flags, and data.
sourcepub async fn ping(&mut self) -> Result<(), MtopError>
pub async fn ping(&mut self) -> Result<(), MtopError>
Send a simple command to verify our connection to the server is working.
sourcepub async fn set(
&mut self,
key: String,
flags: u64,
ttl: u32,
data: Vec<u8>
) -> Result<(), MtopError>
pub async fn set( &mut self, key: String, flags: u64, ttl: u32, data: Vec<u8> ) -> Result<(), MtopError>
Store the provided item in the cache, regardless of whether it already exists.