pub struct BoundExtraction { /* private fields */ }Expand description
Object-bound extraction output awaiting staging and deferred cleanup.
Created by PersistedExtraction::into_bound_sources. Members stage from
their open objects; the retained root handle stays owned here until
cleanup so directory authority is never lost while bound sources are
outstanding.
Implementations§
Source§impl BoundExtraction
impl BoundExtraction
Sourcepub fn members(&self) -> &[BoundMember]
pub fn members(&self) -> &[BoundMember]
Returns the bound members in declaration order.
Sourcepub fn members_mut(&mut self) -> &mut [BoundMember]
pub fn members_mut(&mut self) -> &mut [BoundMember]
Mutably borrows the bound members, for example to prove cursor ownership before staging. The holder owns every shared cursor.
Sourcepub fn into_members(self) -> (Vec<BoundMember>, DeferredCleanup)
pub fn into_members(self) -> (Vec<BoundMember>, DeferredCleanup)
Splits bound staging sources from deferred root cleanup.
The returned members own their open objects; stage them first, then
let their handles close (by consumption into staging or drop) before
running cleanup. Cleanup ordered before
staging completes fails closed on platforms where open handles pin
directory entries, and is never pathname-recursive.
Sourcepub fn cleanup(self) -> Result<(), ExtractionError>
pub fn cleanup(self) -> Result<(), ExtractionError>
Empties the retained operation-owned extraction root through the retained root handle, without staging.
The crate empties the owned tree through the retained directory handle. It never removes the root directory itself and never traverses the root pathname, so a foreign directory, file, symlink, or reparse point installed at the recorded pathname is never touched.
§Contract
Okmeans the owned root object held no entries at the final handle-relative listing: the owned tree was emptied.ErrwithExtractionErrorKind::CleanupFailedmeans the owned root could not be fully emptied. The residue may be partially emptied, its emptiness is not guaranteed, andExtractionError::residue_pathnames the recorded root path.
The residual directory is the caller’s to remove: this crate never
removes it and offers no convenience that removes it by pathname.
Because this call consumes the value, capture the residual path from
root before calling it.
The recorded root path is advisory: if the root was renamed or replaced by a third party, the crate emptied the owned object and left whatever occupies the recorded pathname untouched.
Member objects are closed first (see ExtractedArchive::cleanup).