Skip to main content

GitSnapshotStageDirectory

Struct GitSnapshotStageDirectory 

Source
pub struct GitSnapshotStageDirectory { /* private fields */ }
Expand description

Retained create-only directory for assembling one private operation stage.

Implementations§

Source§

impl GitSnapshotStageDirectory

Source

pub fn create( isolation_root: &Path, operation_id: &str, ) -> Result<Self, GitSnapshotError>

Create one new operation stage below the strict private snapshots store.

The fixed store is created once when absent. The operation directory itself is always create-only: an existing complete or partial stage is never reused by this path.

§Errors

Returns a typed failure for an unsafe operation, non-private or rebound directory, failed durability barrier, or an existing operation stage.

Source

pub fn archive_path(&self) -> PathBuf

Exact create-only archive destination consumed by the deterministic source archiver.

Source

pub fn write_archive_bytes_create_new( &self, bytes: &[u8], expected: &SourceArchive, ) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>

Create and durably publish an exact already-verified archive byte sequence.

This is used only for exact-source retry after the parent blob was re-read and verified from the private Git object database. Ordinary workspace capture continues to use the deterministic streaming source archiver.

§Errors

Returns a typed failure for size/SHA mismatch, archive-limit overflow, an existing file, unsafe filesystem identity, or failed file/directory durability.

Source

pub fn descriptor_path(&self) -> PathBuf

Exact create-only descriptor destination.

Source

pub fn isolation_root_identity(&self) -> &str

Root identity persisted into canonical stage bytes and the durable locator.

Source

pub fn snapshots_store_identity(&self) -> &str

Snapshot-store identity persisted into canonical stage bytes and the durable locator.

Source

pub fn stage_directory_identity(&self) -> &str

Operation-stage identity persisted into canonical stage bytes and the durable locator.

Source

pub fn write_descriptor_create_new( &self, descriptor: &GitSnapshotDescriptor, ) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>

Create and durably publish the exact canonical descriptor bytes.

§Errors

Returns a typed failure if the descriptor cannot be encoded, the destination already exists, the private stage changed, or file/directory synchronization fails.

Source

pub fn seal_archive( &self, expected: &SourceArchive, ) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>

Synchronize and bind the already create-only deterministic archive.

The archive creator remains responsible for create-only ZIP construction. This barrier reopens its exact single-link identity, synchronizes it, and reproduces its size/SHA-256 while the identity guard remains live.

§Errors

Returns a typed failure for a missing, rebound, oversized, unsynchronized, or digest- mismatched archive.

Source

pub fn precompute_inputs( &self, archive_file_identity: &RegularFileFilesystemIdentity, descriptor_file_identity: &RegularFileFilesystemIdentity, archive: &SourceArchive, descriptor: &GitSnapshotDescriptor, ) -> Result<GitSnapshotPrecomputeInputs, GitSnapshotError>

Reopen the exact archive and descriptor as retained no-write precompute inputs.

Callers must probe the fixed private Git database for exact SHA-1 object format before hashing either returned input. The archive is supplied as an already-open reader; the descriptor is supplied as exact canonical bytes. No file, Git object, ref, or network state is mutated by this method.

§Errors

Returns a typed failure for any directory, entry-set, file identity, digest, or canonical descriptor mismatch.

Source

pub fn publish_metadata_create_new( &self, stage: &GitSnapshotStageV1, descriptor: &GitSnapshotDescriptor, final_request: &IosDeviceBuildRequest, ) -> Result<GitSnapshotStageLocatorV1, GitSnapshotError>

Create and durably publish canonical stage.json, returning its path-free locator.

The metadata destination is create-only. Success requires exact request/descriptor/stage binding and reproduces both staged file identities and digests before the final directory metadata barrier.

§Errors

Returns a typed failure for any stage, request, identity, digest, encoding, unexpected entry, create-only, or durability mismatch.

Trait Implementations§

Source§

impl Debug for GitSnapshotStageDirectory

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.