Skip to main content

GitSnapshotImportInputs

Struct GitSnapshotImportInputs 

Source
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

Source

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.

Source

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.

Source

pub const fn locator(&self) -> &GitSnapshotStageLocatorV1

Exact path-free locator used for this reopen.

Source

pub const fn stage(&self) -> &GitSnapshotStageV1

Canonical stage metadata bound to the final request.

Source

pub const fn descriptor(&self) -> &GitSnapshotDescriptor

Canonical descriptor bound to the final request.

Source

pub fn descriptor_bytes(&self) -> &[u8] ⓘ

Exact canonical descriptor bytes from the retained staged file.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for GitSnapshotImportInputs

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.