pub trait ToolsetCache: Send + Sync {
type Error: Error + Send + Sync + 'static;
// Required methods
fn get_cached<'life0, 'life1, 'async_trait>(
&'life0 self,
cache_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put_cache<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache_key: &'life1 str,
json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Abstraction over toolset manifest caching.
Required Associated Types§
Required Methods§
Sourcefn get_cached<'life0, 'life1, 'async_trait>(
&'life0 self,
cache_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_cached<'life0, 'life1, 'async_trait>(
&'life0 self,
cache_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a cached value by key.
Sourcefn put_cache<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache_key: &'life1 str,
json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_cache<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache_key: &'life1 str,
json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a value in the cache.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".