Skip to main content

BlobStore

Trait BlobStore 

Source
pub trait BlobStore: Send + Sync {
    // Required methods
    fn write<'life0, 'async_trait>(
        &'life0 self,
        request: BlobWriteRequest,
    ) -> Pin<Box<dyn Future<Output = Result<BlobMeta, BlobIoError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn read<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blob_id: &'life1 BlobId,
    ) -> Pin<Box<dyn Future<Output = Result<BlobRead, BlobIoError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn head<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blob_id: &'life1 BlobId,
    ) -> Pin<Box<dyn Future<Output = Result<BlobHead, BlobIoError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blob_id: &'life1 BlobId,
    ) -> Pin<Box<dyn Future<Output = Result<bool, BlobIoError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Blob store abstraction.

Required Methods§

Source

fn write<'life0, 'async_trait>( &'life0 self, request: BlobWriteRequest, ) -> Pin<Box<dyn Future<Output = Result<BlobMeta, BlobIoError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Stream-write a blob and return metadata.

Source

fn read<'life0, 'life1, 'async_trait>( &'life0 self, blob_id: &'life1 BlobId, ) -> Pin<Box<dyn Future<Output = Result<BlobRead, BlobIoError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Stream-read a blob by id.

Source

fn head<'life0, 'life1, 'async_trait>( &'life0 self, blob_id: &'life1 BlobId, ) -> Pin<Box<dyn Future<Output = Result<BlobHead, BlobIoError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Read blob metadata only.

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, blob_id: &'life1 BlobId, ) -> Pin<Box<dyn Future<Output = Result<bool, BlobIoError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Delete a blob by id.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§