1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*!
rust-memcache is a [Memcached](https://memcached.org/) client written in pure rust.
# Install:
The crate is called `memcache` and you can depend on it via cargo:
```ini
[dependencies.redis]
version = "*"
```
# Features:
- <input type="checkbox" disabled checked /> ASCII protocal
- <input type="checkbox" disabled /> Binary protocal
- <input type="checkbox" disabled checked /> TCP connection
- <input type="checkbox" disabled /> UDP connection
- <input type="checkbox" disabled /> UNIX Domain socket connection
- <input type="checkbox" disabled /> Automatically compress
- <input type="checkbox" disabled /> Automatically serialize to JSON / msgpack etc.
- <input type="checkbox" disabled checked /> Typed interface
- <input type="checkbox" disabled /> Mutiple server support with custom key hash algorithm
# Basic usage:
```rust
// create connection
let mut conn = memcache::Connection::connect("127.0.0.1:12345").unwrap();
// flush the database
conn.flush().unwrap();
// set a string value
conn.set("foo", "bar").unwrap();
// retrieve from memcached
let value: String = conn.get("foo").unwrap();
assert!(value == "bar");
// set a int value
conn.set("number", 42).unwrap();
// increment it atomic
conn.incr("number", 1).unwrap();
// retrieve it as i32
let value: i32 = conn.get("number").unwrap();
assert!(value == 43);
```
!*/
pub use Connection;
pub use MemcacheError;
pub use Options;
pub use ;