StorageEngineBuilder

Trait StorageEngineBuilder 

Source
pub trait StorageEngineBuilder: Send + Sync {
    type Engine: StorageEngine + Send + Sync + 'static;

    // Required methods
    fn build<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Engine>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cleanup<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Builder trait for creating StorageEngine instances for testing

Required Associated Types§

Source

type Engine: StorageEngine + Send + Sync + 'static

The concrete StorageEngine type returned by this builder

Required Methods§

Source

fn build<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Engine>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new StorageEngine instance for testing

Source

fn cleanup<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clean up any resources after testing

Implementors§