pub struct FsPackSink { /* private fields */ }Expand description
The upload handle of FsBlobStore: a temp file and a running hash.
Memory is one chunk, never the blob.
Trait Implementations§
Source§impl Debug for FsPackSink
impl Debug for FsPackSink
Source§impl Drop for FsPackSink
impl Drop for FsPackSink
Source§impl PackSink for FsPackSink
impl PackSink for FsPackSink
Source§async fn write(&mut self, chunk: Bytes) -> Result<(), StoreError>
async fn write(&mut self, chunk: Bytes) -> Result<(), StoreError>
Append a chunk. Writing past the declared length is
StoreError::Invalid.Source§async fn commit(self) -> Result<CommitOutcome, StoreError>
async fn commit(self) -> Result<CommitOutcome, StoreError>
Make the blob visible, only if
BLAKE3(bytes) == key and the total
equals the declared length; otherwise StoreError::Invalid and
nothing is visible (a streaming backend withholds its final part
until the hash verifies). Read moreSource§async fn commit_with_root(
self,
content_root: Hash,
) -> Result<CommitOutcome, StoreError>
async fn commit_with_root( self, content_root: Hash, ) -> Result<CommitOutcome, StoreError>
Make an object blob visible, only if the total equals the
declared length and
BLAKE3(bytes) == content_root (the key is the
object id, so it cannot be the hash of the bytes). Verification and
visibility are as for Self::commit: a streaming backend withholds
its final byte until the root verifies. A pack or marker key is
StoreError::Invalid. A backend that cannot verify a root is
StoreError::Unsupported, which is the default.Auto Trait Implementations§
impl Freeze for FsPackSink
impl RefUnwindSafe for FsPackSink
impl Send for FsPackSink
impl Sync for FsPackSink
impl Unpin for FsPackSink
impl UnsafeUnpin for FsPackSink
impl UnwindSafe for FsPackSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more