[][src]Trait bee_storage::backend::StorageBackend

pub trait StorageBackend: Send + Sized + Sync + 'static {
    type ConfigBuilder: Default + DeserializeOwned + Into<Self::Config>;
    type Config: Clone + Send + Sync;
    type Error: Error + Send;
#[must_use]    pub fn start<'async_trait>(
        config: Self::Config
    ) -> Pin<Box<dyn Future<Output = Result<Self, Box<dyn Error>>> + Send + 'async_trait>>
    where
        Self: 'async_trait
;
#[must_use] pub fn shutdown<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }

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.

Loading content...

Required methods

#[must_use]pub fn start<'async_trait>(
    config: Self::Config
) -> Pin<Box<dyn Future<Output = Result<Self, Box<dyn Error>>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Initializes and starts the backend.

#[must_use]pub fn shutdown<'async_trait>(
    self
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Shutdowns the backend.

Loading content...

Implementors

Loading content...