pub struct TransferStore { /* private fields */ }Expand description
One exclusive process-local store owner. The file lock is held until drop. Existing ancestors must be deployment-protected; Windows additionally requires a deployment-owned private ACL. Reparse points are rejected on all Windows paths.
Implementations§
Source§impl TransferStore
impl TransferStore
Sourcepub fn open(
root: impl Into<PathBuf>,
limits: TransferLimits,
) -> TransferResult<Self>
pub fn open( root: impl Into<PathBuf>, limits: TransferLimits, ) -> TransferResult<Self>
Opens an existing owner-protected root, holds a nonblocking cross-process lock, and scans quota before admitting new work. Never creates arbitrary ancestors.
Sourcepub fn begin(
&mut self,
descriptor: ObjectDescriptor,
) -> TransferResult<TransferSession<'_>>
pub fn begin( &mut self, descriptor: ObjectDescriptor, ) -> TransferResult<TransferSession<'_>>
Starts/reopens only this exact authenticated-by-caller descriptor. Recovered block hashes are revalidated. Corrupt metadata or blocks fail closed and stay available for diagnostics; purge the partial explicitly before redownloading.
Sourcepub fn prune_expired(&mut self, ttl: Duration) -> TransferResult<usize>
pub fn prune_expired(&mut self, ttl: Duration) -> TransferResult<usize>
Explicit TTL cleanup of incomplete objects only, under the root lock. Unknown/corrupt metadata fails closed. Complete objects are never removed.
Sourcepub fn purge_partial(
&mut self,
descriptor: &ObjectDescriptor,
) -> TransferResult<()>
pub fn purge_partial( &mut self, descriptor: &ObjectDescriptor, ) -> TransferResult<()>
Explicitly removes only a known incomplete object’s private inventory. A complete object, unknown file or invalid metadata prevents deletion.