Trait bee_storage::backend::StorageBackend [−][src]
Trait to be implemented on a storage backend. Determines how to start and shutdown the backend.
Associated Types
type ConfigBuilder: Default + DeserializeOwned + Into<Self::Config>[src]
Helps build the associated Config.
type Config: Clone + Send + Sync[src]
Holds the backend options.
type Error: Error + Send[src]
Returned on failed operations.
Required methods
#[must_use]fn start<'async_trait>(
config: Self::Config
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait, [src]
config: Self::Config
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait,
Initializes and starts the backend.
#[must_use]fn shutdown<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait, [src]
self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait,
Shutdowns the backend.
#[must_use]fn size<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<usize>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<usize>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the size of the database in bytes. Not all backends may be able to provide this operation.
#[must_use]fn get_health<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<StorageHealth>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<StorageHealth>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the health status of the database. Not all backends may be able to provide this operation.
#[must_use]fn set_health<'life0, 'async_trait>(
&'life0 self,
health: StorageHealth
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
health: StorageHealth
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Sets the health status of the database. Not all backends may be able to provide this operation.