Enum mouscache::Cache [−][src]
pub enum Cache { Memory(MemoryCache), Redis(RedisCache), }
Variants
Memory(MemoryCache)
Redis(RedisCache)
Methods
impl Cache
[src]
impl Cache
pub fn insert<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K,
obj: O
) -> Result<()>
[src]
pub fn insert<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K,
obj: O
) -> Result<()>
pub fn get<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K
) -> Result<Option<O>>
[src]
pub fn get<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K
) -> Result<Option<O>>
pub fn remove<K: ToString, O: Cacheable>(&self, key: K) -> Result<()>
[src]
pub fn remove<K: ToString, O: Cacheable>(&self, key: K) -> Result<()>
Trait Implementations
impl Clone for Cache
[src]
impl Clone for Cache
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl CacheFunc for Cache
[src]
impl CacheFunc for Cache
fn hash_delete(&self, key: &str, fields: &[&str]) -> Result<bool>
[src]
fn hash_delete(&self, key: &str, fields: &[&str]) -> Result<bool>
fn hash_exists(&self, key: &str, field: &str) -> Result<bool>
[src]
fn hash_exists(&self, key: &str, field: &str) -> Result<bool>
fn hash_get<T: FromStr>(&self, key: &str, field: &str) -> Result<Option<T>>
[src]
fn hash_get<T: FromStr>(&self, key: &str, field: &str) -> Result<Option<T>>
fn hash_get_all<T: Cacheable + Clone + 'static>(
&self,
key: &str
) -> Result<Option<T>>
[src]
fn hash_get_all<T: Cacheable + Clone + 'static>(
&self,
key: &str
) -> Result<Option<T>>
fn hash_keys(&self, key: &str) -> Result<Vec<String>>
[src]
fn hash_keys(&self, key: &str) -> Result<Vec<String>>
fn hash_len(&self, key: &str) -> Result<usize>
[src]
fn hash_len(&self, key: &str) -> Result<usize>
fn hash_multiple_get(
&self,
key: &str,
fields: &[&str]
) -> Result<Vec<Option<String>>>
[src]
fn hash_multiple_get(
&self,
key: &str,
fields: &[&str]
) -> Result<Vec<Option<String>>>
fn hash_multiple_set<V: ToString>(
&self,
key: &str,
fv_pairs: &[(&str, V)]
) -> Result<bool>
[src]
fn hash_multiple_set<V: ToString>(
&self,
key: &str,
fv_pairs: &[(&str, V)]
) -> Result<bool>
fn hash_set<V: ToString>(
&self,
key: &str,
field: &str,
value: V
) -> Result<bool>
[src]
fn hash_set<V: ToString>(
&self,
key: &str,
field: &str,
value: V
) -> Result<bool>
fn hash_set_all<T: Cacheable + Clone + 'static>(
&self,
key: &str,
cacheable: T
) -> Result<bool>
[src]
fn hash_set_all<T: Cacheable + Clone + 'static>(
&self,
key: &str,
cacheable: T
) -> Result<bool>
fn hash_set_if_not_exists<V: ToString>(
&self,
key: &str,
field: &str,
value: V
) -> Result<bool>
[src]
fn hash_set_if_not_exists<V: ToString>(
&self,
key: &str,
field: &str,
value: V
) -> Result<bool>
fn hash_values(&self, key: &str) -> Result<Vec<String>>
[src]
fn hash_values(&self, key: &str) -> Result<Vec<String>>
fn set_add<V: ToString>(&self, key: &str, members: &[V]) -> Result<bool>
[src]
fn set_add<V: ToString>(&self, key: &str, members: &[V]) -> Result<bool>
fn set_card(&self, key: &str) -> Result<u64>
[src]
fn set_card(&self, key: &str) -> Result<u64>
fn set_diff(&self, keys: &[&str]) -> Result<Vec<String>>
[src]
fn set_diff(&self, keys: &[&str]) -> Result<Vec<String>>
fn set_diffstore(&self, diff_name: &str, keys: &[&str]) -> Result<u64>
[src]
fn set_diffstore(&self, diff_name: &str, keys: &[&str]) -> Result<u64>
fn set_inter(&self, keys: &[&str]) -> Result<Vec<String>>
[src]
fn set_inter(&self, keys: &[&str]) -> Result<Vec<String>>
fn set_interstore(&self, inter_name: &str, keys: &[&str]) -> Result<u64>
[src]
fn set_interstore(&self, inter_name: &str, keys: &[&str]) -> Result<u64>
fn set_ismember<V: ToString>(&self, key: &str, member: V) -> Result<bool>
[src]
fn set_ismember<V: ToString>(&self, key: &str, member: V) -> Result<bool>
fn set_members(&self, key: &str) -> Result<Vec<String>>
[src]
fn set_members(&self, key: &str) -> Result<Vec<String>>
fn set_move<V: ToString>(
&self,
key1: &str,
key2: &str,
member: V
) -> Result<bool>
[src]
fn set_move<V: ToString>(
&self,
key1: &str,
key2: &str,
member: V
) -> Result<bool>
fn set_rem<V: ToString>(&self, key: &str, member: V) -> Result<bool>
[src]
fn set_rem<V: ToString>(&self, key: &str, member: V) -> Result<bool>
fn set_union(&self, keys: &[&str]) -> Result<Vec<String>>
[src]
fn set_union(&self, keys: &[&str]) -> Result<Vec<String>>
fn set_unionstore(&self, union_name: &str, keys: &[&str]) -> Result<u64>
[src]
fn set_unionstore(&self, union_name: &str, keys: &[&str]) -> Result<u64>
impl Send for Cache
[src]
impl Send for Cache
impl Sync for Cache
[src]
impl Sync for Cache