pub trait CacheFunc {
Show 24 methods
// Required methods
fn hash_delete(&self, key: &str, fields: &[&str]) -> Result<bool>;
fn hash_exists(&self, key: &str, field: &str) -> Result<bool>;
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>>;
fn hash_keys(&self, key: &str) -> Result<Vec<String>>;
fn hash_len(&self, key: &str) -> Result<usize>;
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>;
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>;
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>>;
fn set_add<V: ToString>(&self, key: &str, members: &[V]) -> Result<bool>;
fn set_card(&self, key: &str) -> Result<u64>;
fn set_diff(&self, keys: &[&str]) -> Result<Vec<String>>;
fn set_diffstore(&self, diff_name: &str, keys: &[&str]) -> Result<u64>;
fn set_inter(&self, keys: &[&str]) -> Result<Vec<String>>;
fn set_interstore(&self, inter_name: &str, keys: &[&str]) -> Result<u64>;
fn set_ismember<V: ToString>(&self, key: &str, member: V) -> Result<bool>;
fn set_members(&self, key: &str) -> Result<Vec<String>>;
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>;
fn set_union(&self, keys: &[&str]) -> Result<Vec<String>>;
fn set_unionstore(&self, union_name: &str, keys: &[&str]) -> Result<u64>;
}
Required Methods§
fn hash_delete(&self, key: &str, fields: &[&str]) -> Result<bool>
fn hash_exists(&self, key: &str, field: &str) -> Result<bool>
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>>
fn hash_keys(&self, key: &str) -> Result<Vec<String>>
fn hash_len(&self, key: &str) -> Result<usize>
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>
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>
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>>
fn set_add<V: ToString>(&self, key: &str, members: &[V]) -> Result<bool>
fn set_card(&self, key: &str) -> Result<u64>
fn set_diff(&self, keys: &[&str]) -> Result<Vec<String>>
fn set_diffstore(&self, diff_name: &str, keys: &[&str]) -> Result<u64>
fn set_inter(&self, keys: &[&str]) -> Result<Vec<String>>
fn set_interstore(&self, inter_name: &str, keys: &[&str]) -> Result<u64>
fn set_ismember<V: ToString>(&self, key: &str, member: V) -> Result<bool>
fn set_members(&self, key: &str) -> Result<Vec<String>>
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>
fn set_union(&self, keys: &[&str]) -> Result<Vec<String>>
fn set_unionstore(&self, union_name: &str, keys: &[&str]) -> Result<u64>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.