Trait engula_kernel::Storage[][src]

pub trait Storage: 'static + Clone + Send + Sync {
    type Bucket: Bucket;
    fn bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Self::Bucket, Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn create_bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Self::Bucket, Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

An interface to manipulate a storage.

Associated Types

Required methods

Returns a bucket.

Creates a bucket.

Errors

Returns Error::AlreadyExists if the bucket already exists.

Deletes a bucket.

Using a deleted bucket is an undefined behavior.

Errors

Returns Error::NotFound if the bucket doesn’t exist.

Implementations on Foreign Types

Implementors