pub struct DriverCache { /* private fields */ }Expand description
An on-disk content-addressed cache for driver pipeline outputs.
Not available on wasm32 targets (no filesystem).
Implementations§
Source§impl DriverCache
impl DriverCache
Sourcepub fn open(project_root: &Path) -> Self
pub fn open(project_root: &Path) -> Self
Open (or create) a cache rooted at project_root/.crepus-cache/.
Sourcepub fn is_up_to_date(&self, fp: &Fingerprint, output: &str) -> bool
pub fn is_up_to_date(&self, fp: &Fingerprint, output: &str) -> bool
Returns true if output is byte-for-byte identical to the last
recorded output for fp. Returns false on any I/O error or cache miss.
Sourcepub fn record(&self, fp: &Fingerprint, output: &str)
pub fn record(&self, fp: &Fingerprint, output: &str)
Record the output hash for fp so future calls to Self::is_up_to_date
can detect unchanged output.
Call this after successfully writing the actual output file.
Auto Trait Implementations§
impl Freeze for DriverCache
impl RefUnwindSafe for DriverCache
impl Send for DriverCache
impl Sync for DriverCache
impl Unpin for DriverCache
impl UnsafeUnpin for DriverCache
impl UnwindSafe for DriverCache
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