pub struct PersistentTransfer { /* private fields */ }Expand description
Opaque receiver state bound to one canonical manifest and one opened capability-rooted checkpoint directory.
Implementations§
Source§impl PersistentTransfer
impl PersistentTransfer
pub fn create( root: &Dir, relative_checkpoint: impl AsRef<Path>, manifest: ChunkManifest, ) -> Result<Self, TransferReceiverError>
pub fn open( root: &Dir, relative_checkpoint: impl AsRef<Path>, expected_manifest_digest: &str, ) -> Result<Self, TransferReceiverError>
pub fn manifest(&self) -> &ChunkManifest
pub fn manifest_digest(&self) -> &str
pub fn accept_chunk_from( &self, index: u32, reader: impl Read, ) -> Result<ChunkAcceptance, TransferReceiverError>
pub fn missing_chunks( &self, cursor: Option<u32>, limit: usize, ) -> Result<MissingChunkPage, TransferReceiverError>
Sourcepub fn materialize_to(
&self,
destination_root: &Dir,
relative_destination: impl AsRef<Path>,
) -> Result<VerifiedMaterialization, TransferReceiverError>
pub fn materialize_to( &self, destination_root: &Dir, relative_destination: impl AsRef<Path>, ) -> Result<VerifiedMaterialization, TransferReceiverError>
Verify and atomically install the complete received object.
The destination is resolved beneath destination_root without following
parent symlinks and must not exist. Object bytes are streamed with fixed
memory from the accepted chunks through the canonical whole-object
verifier into private operation-owned staging beside the destination.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PersistentTransfer
impl RefUnwindSafe for PersistentTransfer
impl Send for PersistentTransfer
impl Sync for PersistentTransfer
impl Unpin for PersistentTransfer
impl UnsafeUnpin for PersistentTransfer
impl UnwindSafe for PersistentTransfer
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