pub struct RedisAsyncClient {
pub url: String,
pub client: Client,
pub connection: MultiplexedConnection,
pub namespace: Namespace,
}
Fields§
§url: String
§client: Client
§connection: MultiplexedConnection
§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) -> MultiplexedConnection
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<()>
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