Trait BlobAllocator

Source
pub trait BlobAllocator: Send + Sync {
    // Required methods
    fn create<'life0, 'async_trait>(
        &'life0 self,
        size: u64,
    ) -> Pin<Box<dyn Future<Output = Result<ProducerBlob, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cleanup<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 BlobToken,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Blob allocator for creating and managing shared blobs.

Required Methods§

Source

fn create<'life0, 'async_trait>( &'life0 self, size: u64, ) -> Pin<Box<dyn Future<Output = Result<ProducerBlob, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new blob of the given size and return a producer handle with a lifecycle token.

Source

fn cleanup<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 BlobToken, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Cleanup a blob proactively using its token (server-side GC).

Implementors§