pub struct PartUploadSession<'p, B: MultipartBlobStore, N, H> { /* private fields */ }Expand description
One part stream. The store owns its bounded hasher and staged bytes; this handle keeps the byte count, authenticated commitment and at most 256 KiB of private buffering before an authority-checked storage write.
Implementations§
Source§impl<B: MultipartBlobStore, N: NamespaceStore, H: HookSet> PartUploadSession<'_, B, N, H>
impl<B: MultipartBlobStore, N: NamespaceStore, H: HookSet> PartUploadSession<'_, B, N, H>
Sourcepub async fn push(&mut self, chunk: Bytes) -> Result<(), ServerError>
pub async fn push(&mut self, chunk: Bytes) -> Result<(), ServerError>
Write one nonempty chunk, rejecting an overrun before storing it.
§Errors
invalid_argument for an empty or overlong chunk; storage errors
retain the fixed redacted message.
Sourcepub async fn finish(self) -> Result<Vec<u8>, ServerError>
pub async fn finish(self) -> Result<Vec<u8>, ServerError>
Verify and commit the part, returning its authenticated receipt.
§Errors
invalid_argument for a short part or mismatched subtree.
Sourcepub async fn abort(self)
pub async fn abort(self)
Discard an incomplete part. An older committed copy of this index is untouched.
Sourcepub async fn abort_with(self, err: &ServerError)
pub async fn abort_with(self, err: &ServerError)
Discard an incomplete stream and record the error returned to the client.
Trait Implementations§
Auto Trait Implementations§
impl<'p, B, N, H> !RefUnwindSafe for PartUploadSession<'p, B, N, H>
impl<'p, B, N, H> !UnwindSafe for PartUploadSession<'p, B, N, H>
impl<'p, B, N, H> Freeze for PartUploadSession<'p, B, N, H>
impl<'p, B, N, H> Send for PartUploadSession<'p, B, N, H>
impl<'p, B, N, H> Sync for PartUploadSession<'p, B, N, H>
impl<'p, B, N, H> Unpin for PartUploadSession<'p, B, N, H>
impl<'p, B, N, H> UnsafeUnpin for PartUploadSession<'p, B, N, H>
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