Struct memcache::Connection
[−]
[src]
pub struct Connection { /* fields omitted */ }
The connection acts as a TCP connection to the memcached server
Methods
impl Connection
[src]
fn connect<A: ToSocketAddrs>(addr: A) -> Result<Connection, MemcacheError>
connect to the memcached server.
Example:
let _ = memcache::Connection::connect("localhost:12345").unwrap();
fn flush(&mut self) -> Result<(), MemcacheError>
fn set<V>(&mut self, key: &str, value: V) -> Result<bool, MemcacheError> where V: ToMemcacheValue
fn set_with_options<V>(&mut self,
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
fn add<V>(&mut self, key: &str, value: V) -> Result<bool, MemcacheError> where V: ToMemcacheValue
fn add_with_options<V>(&mut self,
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
fn replace<V>(&mut self, key: &str, value: V) -> Result<bool, MemcacheError> where V: ToMemcacheValue
fn replace_with_options<V>(&mut self,
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
fn append<V>(&mut self, key: &str, value: V) -> Result<bool, MemcacheError> where V: ToMemcacheValue
fn append_with_options<V>(&mut self,
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
fn prepend<V>(&mut self, key: &str, value: V) -> Result<bool, MemcacheError> where V: ToMemcacheValue
fn prepend_with_options<V>(&mut self,
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
key: &str,
value: V,
options: &Options)
-> Result<bool, MemcacheError> where V: ToMemcacheValue
fn get<V>(&mut self, key: &str) -> Result<V, MemcacheError> where V: FromMemcacheValue
fn delete(&mut self, key: &str) -> Result<bool, MemcacheError>
fn incr(&mut self, key: &str, value: u32) -> Result<Option<u32>, MemcacheError>
fn decr(&mut self, key: &str, value: u32) -> Result<Option<u32>, MemcacheError>
decrement the value of memcached
see: memcached decr
fn version(&mut self) -> Result<String, MemcacheError>
get the memcached server version