pub trait LocalCache<T: Clone>: Send + Sync {
// Required method
fn get_with<'a, 'life0, 'async_trait>(
&'life0 self,
key: String,
future: Box<dyn Future<Output = T> + Send + 'a>,
) -> Pin<Box<dyn Future<Output = Result<T, CacheError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait;
}Expand description
A local cache.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".