pub struct RunWorkspace { /* private fields */ }Expand description
A unique private directory for building one complete run before publication.
Implementations§
Source§impl RunWorkspace
impl RunWorkspace
Sourcepub fn allocate(
root: impl AsRef<Path>,
logical_id: &ArtifactId,
) -> Result<Self, ArtifactPathError>
pub fn allocate( root: impl AsRef<Path>, logical_id: &ArtifactId, ) -> Result<Self, ArtifactPathError>
Allocate a unique staging directory and reserve a collision-resistant publication path derived from the validated logical run ID.
Sourcepub fn staging_path(&self) -> &Path
pub fn staging_path(&self) -> &Path
Return the private directory where run outputs must be written.
Sourcepub fn published_path(&self) -> &Path
pub fn published_path(&self) -> &Path
Return the unique path where the completed run will be published.
Sourcepub fn root(&self) -> &ApprovedRoot
pub fn root(&self) -> &ApprovedRoot
Return the approved output root shared by published and latest artifacts.
Sourcepub fn publish(
self,
required_files: &[ArtifactId],
) -> Result<PublishedRun, ArtifactPathError>
pub fn publish( self, required_files: &[ArtifactId], ) -> Result<PublishedRun, ArtifactPathError>
Publish the complete staging directory without replacing any existing file, directory, or symbolic link at the destination.
Trait Implementations§
Source§impl Debug for RunWorkspace
impl Debug for RunWorkspace
Source§impl Drop for RunWorkspace
impl Drop for RunWorkspace
Auto Trait Implementations§
impl Freeze for RunWorkspace
impl RefUnwindSafe for RunWorkspace
impl Send for RunWorkspace
impl Sync for RunWorkspace
impl Unpin for RunWorkspace
impl UnsafeUnpin for RunWorkspace
impl UnwindSafe for RunWorkspace
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