pub struct ArtifactBuildTransaction { /* private fields */ }Expand description
Owned miss transaction holding the recipe and content-key process locks.
Implementations§
Source§impl ArtifactBuildTransaction
impl ArtifactBuildTransaction
Sourcepub fn staging_directory(&self) -> &Path
pub fn staging_directory(&self) -> &Path
Transaction-owned directory in which the caller may run its build.
Commit accepts only the cache-created outputs child at this root.
Callers must remove or relocate logs and other temporary root children.
Sourcepub fn output_path(&self, name: &str) -> Result<PathBuf, ArtifactCacheError>
pub fn output_path(&self, name: &str) -> Result<PathBuf, ArtifactCacheError>
Checked staging destination for one declared logical output.
§Errors
Returns ArtifactCacheError::UnknownOutput for an undeclared output name.
Sourcepub fn import_output(
&self,
name: &str,
source: &Path,
) -> Result<(), ArtifactCacheError>
pub fn import_output( &self, name: &str, source: &Path, ) -> Result<(), ArtifactCacheError>
Copy a fixed external output into its transaction-owned staging path.
§Errors
Returns an unknown-output or atomic source-copy/publication error.
Sourcepub fn commit(self) -> Result<ArtifactCacheOutcome, ArtifactCacheError>
pub fn commit(self) -> Result<ArtifactCacheOutcome, ArtifactCacheError>
Validate the exact staging schema and atomically publish the complete output set.
§Errors
Returns staging-schema, output verification, input-change, lock or publication errors. Failed staging cleanup preserves both the transaction and cleanup errors.