pub enum Cache {
Redis(Redis),
None,
}Variants§
Implementations§
Trait Implementations§
Source§impl CacheBase for Cache
impl CacheBase for Cache
Source§fn add_hash(
&mut self,
key: &str,
field: &str,
value: JsonValue,
) -> Result<bool, String>
fn add_hash( &mut self, key: &str, field: &str, value: JsonValue, ) -> Result<bool, String>
哈希-添加
Source§fn get_hash_field_value(
&mut self,
key: &str,
field: &str,
) -> Result<JsonValue, String>
fn get_hash_field_value( &mut self, key: &str, field: &str, ) -> Result<JsonValue, String>
哈希-获取指定字段的值
Source§fn add(
&mut self,
key: &str,
value: JsonValue,
expiration_date: u64,
) -> Result<bool, String>
fn add( &mut self, key: &str, value: JsonValue, expiration_date: u64, ) -> Result<bool, String>
设置缓存 Read more
Source§fn set_message_queue(
&mut self,
key: &str,
value: JsonValue,
) -> Result<bool, String>
fn set_message_queue( &mut self, key: &str, value: JsonValue, ) -> Result<bool, String>
设置消息队列
fn set_object( &mut self, key: &str, field: &str, value: JsonValue, ) -> Result<bool, String>
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more