pub struct GitSnapshotImportInputs { /* private fields */ }Expand description
Exact retained files and directories authorized for one snapshot object import.
The archive reader and canonical descriptor bytes originate from already-open identity-bound
files. All guards remain alive until this value is dropped. Call Self::verify_bindings
immediately after the fixed Git runner consumes either input, especially on Unix.
Implementations§
Source§impl GitSnapshotImportInputs
impl GitSnapshotImportInputs
Sourcepub fn delete_stage_exact(
isolation_root: &Path,
locator: &GitSnapshotStageLocatorV1,
expected_stage: &GitSnapshotStageV1,
final_request: &IosDeviceBuildRequest,
) -> Result<(), GitSnapshotError>
pub fn delete_stage_exact( isolation_root: &Path, locator: &GitSnapshotStageLocatorV1, expected_stage: &GitSnapshotStageV1, final_request: &IosDeviceBuildRequest, ) -> Result<(), GitSnapshotError>
Delete one exact bounded stage after its keepalive is durably confirmed.
The durable locator, immutable stage, and final request are independently cross-bound before any removal. Replay accepts a wholly absent operation directory. A partial stage is removed only when every remaining entry is one of the three fixed files and retains its persisted filesystem identity; an unexpected, rebound, linked, or non-regular entry fails closed. The snapshots-store directory is synchronized after every namespace mutation.
§Errors
Returns a typed stage failure for any identity, request, entry-set, exact-removal, or directory-durability failure.
Sourcepub fn load(
isolation_root: &Path,
locator: &GitSnapshotStageLocatorV1,
final_request: &IosDeviceBuildRequest,
) -> Result<Self, GitSnapshotError>
pub fn load( isolation_root: &Path, locator: &GitSnapshotStageLocatorV1, final_request: &IosDeviceBuildRequest, ) -> Result<Self, GitSnapshotError>
Reopen a complete stage using only its exact durable path-free locator.
§Errors
Returns a typed failure for a locator, pathname, identity, canonical-byte, digest, graph, or already-durable final-request mismatch. This method performs no mutation.
Sourcepub const fn locator(&self) -> &GitSnapshotStageLocatorV1
pub const fn locator(&self) -> &GitSnapshotStageLocatorV1
Exact path-free locator used for this reopen.
Sourcepub const fn stage(&self) -> &GitSnapshotStageV1
pub const fn stage(&self) -> &GitSnapshotStageV1
Canonical stage metadata bound to the final request.
Sourcepub const fn descriptor(&self) -> &GitSnapshotDescriptor
pub const fn descriptor(&self) -> &GitSnapshotDescriptor
Canonical descriptor bound to the final request.
Sourcepub fn descriptor_bytes(&self) -> &[u8] ⓘ
pub fn descriptor_bytes(&self) -> &[u8] ⓘ
Exact canonical descriptor bytes from the retained staged file.
Sourcepub fn archive_reader(&mut self) -> Result<&mut File, GitSnapshotError>
pub fn archive_reader(&mut self) -> Result<&mut File, GitSnapshotError>
Rewind and borrow the already-open exact archive for streaming to fixed Git.
§Errors
Returns a typed failure when a directory or file binding changed or the retained reader cannot be rewound.
Sourcepub fn verify_imported_archive_blob(
&mut self,
actual: &GitSha1ObjectId,
) -> Result<(), GitSnapshotError>
pub fn verify_imported_archive_blob( &mut self, actual: &GitSha1ObjectId, ) -> Result<(), GitSnapshotError>
Require the actual retained archive import ID and then reproduce all staged contents.
Call this synchronously after git hash-object -w --stdin consumes Self::archive_reader
and before importing another object or mutating any ref.
§Errors
Returns a graph mismatch for a different blob ID, or a stage failure for any post-import content/identity/path drift.
Sourcepub fn verify_imported_descriptor_blob(
&mut self,
actual: &GitSha1ObjectId,
) -> Result<(), GitSnapshotError>
pub fn verify_imported_descriptor_blob( &mut self, actual: &GitSha1ObjectId, ) -> Result<(), GitSnapshotError>
Require the actual canonical descriptor import ID and reproduce all staged contents.
Call this synchronously after git hash-object -w --stdin consumes
Self::descriptor_bytes and before importing trees, the commit, or mutating any ref.
§Errors
Returns a graph mismatch for a different blob ID, or a stage failure for any post-import content/identity/path drift.
Sourcepub fn verify_bindings(&mut self) -> Result<(), GitSnapshotError>
pub fn verify_bindings(&mut self) -> Result<(), GitSnapshotError>
Revalidate every retained pathname and reproduce all three staged file contents.
§Errors
Returns a typed failure for any rebound directory, stage entry, file identity, canonical metadata/descriptor byte, or archive size/digest mismatch. The archive is rewound on success. Call this immediately after synchronous Git consumption, especially on Unix.