pub struct LocalActionCache { /* private fields */ }Expand description
A local index from action digests to their referenced cache objects.
Implementations§
Source§impl LocalActionCache
impl LocalActionCache
Sourcepub fn path_for(&self, action: &CacheDigest) -> Result<PathBuf>
pub fn path_for(&self, action: &CacheDigest) -> Result<PathBuf>
Resolve the storage path for an action digest.
Sourcepub fn find(&self, action: &CacheDigest) -> Result<Option<RemoteActionResult>>
pub fn find(&self, action: &CacheDigest) -> Result<Option<RemoteActionResult>>
Find and strictly validate a canonical action result.
Sourcepub fn store(&self, result: &RemoteActionResult) -> Result<PathBuf>
pub fn store(&self, result: &RemoteActionResult) -> Result<PathBuf>
Atomically publish an action result after validating all referenced objects.
Sourcepub fn store_unless_restorable(
&self,
result: &RemoteActionResult,
is_restorable: impl Fn(&RemoteActionResult) -> bool,
) -> Result<ActionStoreOutcome>
pub fn store_unless_restorable( &self, result: &RemoteActionResult, is_restorable: impl Fn(&RemoteActionResult) -> bool, ) -> Result<ActionStoreOutcome>
Publish a result unless an intact existing result is also restorable.
The caller checks any dependencies this index does not understand.
Invalid or unrestorable existing records are repaired as in Self::store.
Trait Implementations§
Source§impl Clone for LocalActionCache
impl Clone for LocalActionCache
Auto Trait Implementations§
impl Freeze for LocalActionCache
impl RefUnwindSafe for LocalActionCache
impl Send for LocalActionCache
impl Sync for LocalActionCache
impl Unpin for LocalActionCache
impl UnsafeUnpin for LocalActionCache
impl UnwindSafe for LocalActionCache
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