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.
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.
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.
Sourcepub fn abort(self) -> Result<(), ArtifactCacheError>
pub fn abort(self) -> Result<(), ArtifactCacheError>
Abandon the transaction and synchronously remove its staging directory.
Trait Implementations§
Source§impl Drop for ArtifactBuildTransaction
impl Drop for ArtifactBuildTransaction
Auto Trait Implementations§
impl Freeze for ArtifactBuildTransaction
impl RefUnwindSafe for ArtifactBuildTransaction
impl Send for ArtifactBuildTransaction
impl Sync for ArtifactBuildTransaction
impl Unpin for ArtifactBuildTransaction
impl UnsafeUnpin for ArtifactBuildTransaction
impl UnwindSafe for ArtifactBuildTransaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more