pub struct PackageCache<T> { /* private fields */ }Expand description
On-disk cache for file-scoped analysis results within a package.
Implementations§
Source§impl<T> PackageCache<T>
impl<T> PackageCache<T>
pub fn open( cache_root: &Path, canonical_root: PathBuf, tool_version: &str, package_key: &impl CacheKey, ) -> Result<Self>
pub fn path(&self) -> &Path
pub fn get(&mut self, relative_path: &Path, key: &FileCacheKey) -> Option<T>
pub fn insert(&mut self, relative_path: PathBuf, key: FileCacheKey, data: T)
pub fn persist(self) -> Result<()>
Trait Implementations§
Source§impl<T: Clone> Clone for PackageCache<T>
impl<T: Clone> Clone for PackageCache<T>
Source§fn clone(&self) -> PackageCache<T>
fn clone(&self) -> PackageCache<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for PackageCache<T>
impl<T> RefUnwindSafe for PackageCache<T>where
T: RefUnwindSafe,
impl<T> Send for PackageCache<T>where
T: Send,
impl<T> Sync for PackageCache<T>where
T: Sync,
impl<T> Unpin for PackageCache<T>
impl<T> UnsafeUnpin for PackageCache<T>
impl<T> UnwindSafe for PackageCache<T>where
T: RefUnwindSafe,
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