Skip to main content

StoreFactory

Trait StoreFactory 

Source
pub trait StoreFactory: Send + Sync {
    type Store: PersistenceStore;

    // Required method
    fn create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Store, PersistenceError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

存储工厂 trait

用于创建存储实例

Required Associated Types§

Source

type Store: PersistenceStore

存储类型

Required Methods§

Source

fn create<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::Store, PersistenceError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

创建存储实例

Implementors§