pub struct CapturedArtifact { /* private fields */ }Expand description
Owned copy of one completed producer output, independent of later source replacement.
Keep this record alive through every use of Self::path. The copy is
temporary rather than a reusable cache entry; dropping its owner removes it.
Implementations§
Source§impl CapturedArtifact
impl CapturedArtifact
Sourcepub fn capture(
source: &Path,
parent: &Path,
maximum_bytes: usize,
) -> Result<Self>
pub fn capture( source: &Path, parent: &Path, maximum_bytes: usize, ) -> Result<Self>
Capture an output synchronously before another producer can overwrite it.
The caller keeps the source stable during capture and selects the maximum readable byte count. Read/publication failures retain their typed causes inside the returned I/O error. Existing public destinations are untouched.
§Errors
Returns the source read/byte-limit, staging allocation or durable-write error. An unsuccessful capture performs best-effort staging cleanup.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CapturedArtifact
impl RefUnwindSafe for CapturedArtifact
impl Send for CapturedArtifact
impl Sync for CapturedArtifact
impl Unpin for CapturedArtifact
impl UnsafeUnpin for CapturedArtifact
impl UnwindSafe for CapturedArtifact
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