pub trait CacheStore:
Send
+ Sync
+ 'static {
// Required methods
fn get(&self, key: String) -> BoxFuture<'_, Result<Option<Value>>>;
fn set(
&self,
key: String,
value: Value,
ttl: Option<Duration>,
) -> BoxFuture<'_, Result<()>>;
fn delete(&self, key: String) -> BoxFuture<'_, Result<()>>;
fn clear(&self) -> BoxFuture<'_, Result<()>>;
}Expand description
Re-exported public API.
Public Caelix extension trait CacheStore.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".