[−][src]Enum mouscache::Cache
Variants
Memory(MemoryCache)
Redis(RedisCache)
Methods
impl Cache
[src]
pub fn insert<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K,
obj: O
) -> Result<()>
[src]
&self,
key: K,
obj: O
) -> Result<()>
pub fn insert_with<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K,
obj: O,
expires_after: Option<usize>
) -> Result<()>
[src]
&self,
key: K,
obj: O,
expires_after: Option<usize>
) -> Result<()>
pub fn get<K: ToString, O: Cacheable + Clone + 'static>(
&self,
key: K
) -> Result<Option<O>>
[src]
&self,
key: K
) -> Result<Option<O>>
pub fn remove<K: ToString, O: Cacheable>(&self, key: K) -> Result<()>
[src]
Trait Implementations
impl CacheFunc for Cache
[src]
fn hash_delete(&self, key: &str, fields: &[&str]) -> Result<bool>
[src]
fn hash_exists(&self, key: &str, field: &str) -> Result<bool>
[src]
fn hash_get<T: FromStr>(&self, key: &str, field: &str) -> Result<Option<T>>
[src]
fn hash_get_all<T: Cacheable + Clone + 'static>(
&self,
key: &str
) -> Result<Option<T>>
[src]
&self,
key: &str
) -> Result<Option<T>>
fn hash_keys(&self, key: &str) -> Result<Vec<String>>
[src]
fn hash_len(&self, key: &str) -> Result<usize>
[src]
fn hash_multiple_get(
&self,
key: &str,
fields: &[&str]
) -> Result<Vec<Option<String>>>
[src]
&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]
&self,
key: &str,
fv_pairs: &[(&str, V)]
) -> Result<bool>
fn hash_set<V: ToString>(
&self,
key: &str,
field: &str,
value: V
) -> Result<bool>
[src]
&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]
&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]
&self,
key: &str,
field: &str,
value: V
) -> Result<bool>
fn hash_values(&self, key: &str) -> Result<Vec<String>>
[src]
fn set_add<V: ToString>(&self, key: &str, members: &[V]) -> Result<bool>
[src]
fn set_card(&self, key: &str) -> Result<u64>
[src]
fn set_diff(&self, keys: &[&str]) -> Result<Vec<String>>
[src]
fn set_diffstore(&self, diff_name: &str, keys: &[&str]) -> Result<u64>
[src]
fn set_inter(&self, keys: &[&str]) -> Result<Vec<String>>
[src]
fn set_interstore(&self, inter_name: &str, keys: &[&str]) -> Result<u64>
[src]
fn set_ismember<V: ToString>(&self, key: &str, member: V) -> Result<bool>
[src]
fn set_members(&self, key: &str) -> Result<Vec<String>>
[src]
fn set_move<V: ToString>(
&self,
key1: &str,
key2: &str,
member: V
) -> Result<bool>
[src]
&self,
key1: &str,
key2: &str,
member: V
) -> Result<bool>
fn set_rem<V: ToString>(&self, key: &str, member: V) -> Result<bool>
[src]
fn set_union(&self, keys: &[&str]) -> Result<Vec<String>>
[src]
fn set_unionstore(&self, union_name: &str, keys: &[&str]) -> Result<u64>
[src]
impl Send for Cache
[src]
impl Sync for Cache
[src]
impl Clone for Cache
[src]
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,