Skip to main content

MemcachedClient

Trait MemcachedClient 

Source
pub trait MemcachedClient:
    Send
    + Sync
    + Debug {
    // Required method
    fn incr(
        &self,
        key: &str,
        initial: u64,
        ttl_secs: u32,
    ) -> Result<u64, ServerError>;
}
Available on crate feature distributed-rate-limit only.
Expand description

Minimal Memcached-like client contract.

§Examples

use http_handle::distributed_rate_limit::MemcachedClient;
assert_eq!(1, 1);

§Panics

Trait usage does not panic by itself.

Required Methods§

Source

fn incr( &self, key: &str, initial: u64, ttl_secs: u32, ) -> Result<u64, ServerError>

Increments key and returns current count.

Implementors§