pub trait InitializeStorage:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn is_initialized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initialize_storage<'life0, 'async_trait>(
&'life0 self,
stop_receiver: Receiver<bool>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An abstract storage initialization strategy.
Required Methods§
Sourcefn is_initialized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_initialized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks if the storage is already initialized.
Sourcefn initialize_storage<'life0, 'async_trait>(
&'life0 self,
stop_receiver: Receiver<bool>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize_storage<'life0, 'async_trait>(
&'life0 self,
stop_receiver: Receiver<bool>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initializes the storage. Implementors of this method may assume that they have unique access to the storage.