Skip to main content

BlobWriter

Trait 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 to 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 an already-closed BlobWriter is a no-op.

Implementors§

Source§

impl BlobWriter for MemoryBlobWriter

Source§

impl BlobWriter for TestBlobWriter

Available on crate features mocks only.
Source§

impl<W, Fut> BlobWriter for ObjectStoreBlobWriter<W, Fut>
where W: AsyncWrite + Send + Unpin, Fut: Future<Output = Result<B3Digest>> + Send + Unpin,

Source§

impl<W: AsyncWrite + Send + Sync + Unpin + 'static> BlobWriter for GRPCBlobWriter<W>