pub struct ChunkTransferSource { /* private fields */ }Expand description
An opaque, capability-bound source for one immutable local version.
The source retains open handles for the root, version record, and blob. Every copy revalidates those handles and the exact version record before and after streaming the requested byte range.
Implementations§
Source§impl ChunkTransferSource
impl ChunkTransferSource
pub fn version_id(&self) -> &VersionId
pub fn manifest(&self) -> &ChunkManifest
pub fn manifest_digest(&self) -> &str
Sourcepub fn copy_chunk(
&mut self,
index: u32,
writer: impl Write,
) -> Result<VerifiedChunk, TransferSourceError>
pub fn copy_chunk( &mut self, index: u32, writer: impl Write, ) -> Result<VerifiedChunk, TransferSourceError>
Stream one exact manifest range into writer using fixed-size buffers.
A success result proves the digest and length observed by this process. A writer failure or changed source returns no proof.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChunkTransferSource
impl RefUnwindSafe for ChunkTransferSource
impl Send for ChunkTransferSource
impl Sync for ChunkTransferSource
impl Unpin for ChunkTransferSource
impl UnsafeUnpin for ChunkTransferSource
impl UnwindSafe for ChunkTransferSource
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