pub trait PartSink: MaybeSend {
// Required methods
fn write(
&mut self,
chunk: Bytes,
) -> impl Future<Output = Result<(), StoreError>> + MaybeSend;
fn commit(
self,
) -> impl Future<Output = Result<Vec<u8>, StoreError>> + MaybeSend;
fn abort(self) -> impl Future<Output = ()> + MaybeSend;
}Expand description
A verified, staged part. commit makes only this part durable; the pack
remains invisible until MultipartBlobStore::complete.
Required Methods§
Sourcefn write(
&mut self,
chunk: Bytes,
) -> impl Future<Output = Result<(), StoreError>> + MaybeSend
fn write( &mut self, chunk: Bytes, ) -> impl Future<Output = Result<(), StoreError>> + MaybeSend
Append a non-empty chunk without exceeding the part’s expected length.
Sourcefn commit(self) -> impl Future<Output = Result<Vec<u8>, StoreError>> + MaybeSend
fn commit(self) -> impl Future<Output = Result<Vec<u8>, StoreError>> + MaybeSend
Verify length and subtree CV, then return an opaque backend tag.
A CV mismatch is StoreError::PartSubtreeMismatch; other invalid
staged state is StoreError::Invalid.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".