pub struct Store { /* private fields */ }Expand description
A loaded cache: what the last run stored, and what this run has produced.
Implementations§
Source§impl Store
impl Store
Sourcepub fn load(project_root: &Path) -> Self
pub fn load(project_root: &Path) -> Self
Load the cache under a project root, or an empty store if there is nothing usable.
Sourcepub fn get(&self, key: &CacheKey) -> Option<&Entry>
pub fn get(&self, key: &CacheKey) -> Option<&Entry>
The entry for a key, if this cache has one.
Sourcepub fn keys(&self) -> impl Iterator<Item = &CacheKey>
pub fn keys(&self) -> impl Iterator<Item = &CacheKey>
Every key held, in order.
For tooling and tests that need to reach an entry without recomputing its key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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