Skip to main content

Crate mcmc_rs

Crate mcmc_rs 

Source
Expand description

Minimal Rust client for Memcached

This crate provides working with memcached server. All methods implemented. Available TCP/Unix/UDP/TLS connections.

  • Connection is a Enum that represents a connection to memcached server.
  • Pipeline is a structure that represents a pipeline of memcached commands.
  • WatchStream is a structure that represents a stream of watch events.
  • ClientCrc32 is a structure that represents a Cluster connections with ModN hashing.
  • ClientHashRing is a structure that represents a Cluster connections with Ring hashing.
  • ClientRendezvous is a structure that represents a Cluster connections with Rendezvous hashing.

§Examples

use smol::{block_on, io};

use mcmc_rs::Connection;

fn main() -> io::Result<()> {
    block_on(async {
        let mut conn = Connection::default().await?;
        conn.set(b"key", 0, 0, false, b"value").await?;
        let item = conn.get(b"key").await?.unwrap();
        println!("{item:#?}");
        Ok(())
    })
}

Structs§

ClientCrc32
ClientHashRing
ClientRendezvous
Item
MaItem
Manager
MdItem
MgItem
MsItem
Pipeline
WatchStream

Enums§

AddrArg
Connection
LruArg
LruCrawlerArg
LruCrawlerCrawlArg
LruCrawlerMetadumpArg
LruCrawlerMgdumpArg
LruMode
MaFlag
MaMode
MdFlag
MgFlag
MsFlag
MsMode
PipelineResponse
SlabsAutomoveArg
StatsArg
WatchArg

Functions§

incr_decr_cmd
retrieval_cmd
storage_cmd
version_cmd

Type Aliases§

Pool