Skip to main content

CacheStoreFactory

Trait CacheStoreFactory 

Source
pub trait CacheStoreFactory: Send + Sync {
    // Required method
    fn create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 CacheConfig,
    ) -> Pin<Box<dyn Future<Output = AppResult<Arc<dyn CacheStore>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Factory for a named cache store adapter.

Required Methods§

Source

fn create<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 CacheConfig, ) -> Pin<Box<dyn Future<Output = AppResult<Arc<dyn CacheStore>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Build a cache store from cache configuration.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§