Trait tvix_castore::blobservice::BlobWriter

source ·
pub trait BlobWriter:
    AsyncWrite
    + Send
    + Unpin {
    // Required method
    fn close<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<B3Digest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A tokio::io::AsyncWrite that the user needs to close() afterwards for persist. On success, it returns the digest of the written blob.

Required Methods§

source

fn close<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<B3Digest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signal there’s no more data to be written, and return the digest of the contents written.

Closing a already-closed BlobWriter is a no-op.

Implementors§