pub struct WatchedInputSnapshot { /* private fields */ }Expand description
Exact content digest captured across a set of watched input trees.
Implementations§
Source§impl WatchedInputSnapshot
impl WatchedInputSnapshot
Sourcepub fn capture(
workspace_root: &Path,
watched_relative_paths: &[&str],
) -> Result<Self>
pub fn capture( workspace_root: &Path, watched_relative_paths: &[&str], ) -> Result<Self>
Recursively hash the paths and contents of all watched inputs.
File timestamps are deliberately excluded, so the same content produces the same digest after a Git checkout or CI cache restore.
Sourcepub const fn digest(self) -> InputDigest
pub const fn digest(self) -> InputDigest
Return the exact content digest of the watched inputs.
Sourcepub fn artifact_is_fresh(self, artifact_path: &Path) -> Result<bool>
pub fn artifact_is_fresh(self, artifact_path: &Path) -> Result<bool>
Check whether one artifact carries a matching exact-input stamp.
An existing artifact without a stamp is not considered fresh. Call
mark_artifact_fresh only after the
artifact has been produced successfully from this snapshot.
Sourcepub fn mark_artifact_fresh(self, artifact_path: &Path) -> Result<()>
pub fn mark_artifact_fresh(self, artifact_path: &Path) -> Result<()>
Atomically record that an existing artifact was built from this input snapshot.
Trait Implementations§
Source§impl Clone for WatchedInputSnapshot
impl Clone for WatchedInputSnapshot
Source§fn clone(&self) -> WatchedInputSnapshot
fn clone(&self) -> WatchedInputSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WatchedInputSnapshot
Source§impl Debug for WatchedInputSnapshot
impl Debug for WatchedInputSnapshot
impl Eq for WatchedInputSnapshot
Source§impl PartialEq for WatchedInputSnapshot
impl PartialEq for WatchedInputSnapshot
impl StructuralPartialEq for WatchedInputSnapshot
Auto Trait Implementations§
impl Freeze for WatchedInputSnapshot
impl RefUnwindSafe for WatchedInputSnapshot
impl Send for WatchedInputSnapshot
impl Sync for WatchedInputSnapshot
impl Unpin for WatchedInputSnapshot
impl UnsafeUnpin for WatchedInputSnapshot
impl UnwindSafe for WatchedInputSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.