pub trait CacheFns {
// Required methods
async fn set_cache_key(
&self,
key: String,
value: impl Serialize,
expire: u32,
) -> Result<(), Error>;
async fn get_cache_key<T>(&self, key: String) -> Result<T, Error>
where T: DeserializeOwned;
async fn del_cache_key(&self, key: String) -> Result<(), Error>;
}
Required Methods§
async fn set_cache_key( &self, key: String, value: impl Serialize, expire: u32, ) -> Result<(), Error>
async fn get_cache_key<T>(&self, key: String) -> Result<T, Error>where
T: DeserializeOwned,
async fn del_cache_key(&self, key: String) -> Result<(), Error>
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.