pub struct RedisCache {
pub client: Client,
}Fields§
§client: ClientTrait Implementations§
Source§impl Cache for RedisCache
impl Cache for RedisCache
type Item = String
type Client = Connection
Source§async fn new() -> RedisCache
async fn new() -> RedisCache
Create a new
Cache.Source§async fn get(&self, id: <RedisCache as Cache>::Item) -> Option<String>
async fn get(&self, id: <RedisCache as Cache>::Item) -> Option<String>
Get a cache object by its identifier Read more
Source§async fn set(
&self,
id: <RedisCache as Cache>::Item,
content: <RedisCache as Cache>::Item,
) -> bool
async fn set( &self, id: <RedisCache as Cache>::Item, content: <RedisCache as Cache>::Item, ) -> bool
Set a cache object by its identifier and content Read more
Source§async fn update(
&self,
id: <RedisCache as Cache>::Item,
content: <RedisCache as Cache>::Item,
) -> bool
async fn update( &self, id: <RedisCache as Cache>::Item, content: <RedisCache as Cache>::Item, ) -> bool
Update a cache object by its identifier and content Read more
Source§async fn remove(&self, id: <RedisCache as Cache>::Item) -> bool
async fn remove(&self, id: <RedisCache as Cache>::Item) -> bool
Remove a cache object by its identifier Read more
Source§async fn remove_starting_with(&self, id: <RedisCache as Cache>::Item) -> bool
async fn remove_starting_with(&self, id: <RedisCache as Cache>::Item) -> bool
Remove a cache object by its identifier(’s start) Read more
Source§impl Clone for RedisCache
impl Clone for RedisCache
Source§fn clone(&self) -> RedisCache
fn clone(&self) -> RedisCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RedisCache
impl RefUnwindSafe for RedisCache
impl Send for RedisCache
impl Sync for RedisCache
impl Unpin for RedisCache
impl UnwindSafe for RedisCache
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