pub struct RedisAsyncClient {
pub url: String,
pub connection: ConnectionManager,
pub namespace: Namespace,
}
Fields§
§url: String
§connection: ConnectionManager
§namespace: Namespace
Implementations§
Source§impl RedisAsyncClient
impl RedisAsyncClient
pub async fn new(url: Option<String>, namespace: Namespace) -> Result<Self>
pub async fn set_eviction_policy( &self, eviction_policy: EvictionPolicy, ) -> Result<String>
pub async fn get_eviction_policy(&self) -> Result<String>
pub fn key(&self, prefix: &Prefix, key: &Key) -> String
pub fn connection(&self) -> ConnectionManager
pub async fn get_entity<T>(&self, prefix: &Prefix, key: &Key) -> Result<T>where
T: DeserializeOwned + Serialize,
pub async fn save_entity<T>(
&self,
prefix: &Prefix,
key: &Key,
value: &T,
expiry: Option<u64>,
) -> Result<()>where
T: DeserializeOwned + Serialize,
pub async fn remove_entity(&self, prefix: &Prefix, key: &Key) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RedisAsyncClient
impl !RefUnwindSafe for RedisAsyncClient
impl Send for RedisAsyncClient
impl Sync for RedisAsyncClient
impl Unpin for RedisAsyncClient
impl !UnwindSafe for RedisAsyncClient
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