pub struct AnalysisCache { /* private fields */ }Expand description
LRU cache for file analysis results with mutex protection.
Implementations§
Source§impl AnalysisCache
impl AnalysisCache
Sourcepub fn get(&self, key: &CacheKey) -> Option<Arc<FileAnalysisOutput>>
pub fn get(&self, key: &CacheKey) -> Option<Arc<FileAnalysisOutput>>
Get a cached analysis result if it exists.
Sourcepub fn put(&self, key: CacheKey, value: Arc<FileAnalysisOutput>)
pub fn put(&self, key: CacheKey, value: Arc<FileAnalysisOutput>)
Store an analysis result in the cache.
Sourcepub fn get_directory(
&self,
key: &DirectoryCacheKey,
) -> Option<Arc<AnalysisOutput>>
pub fn get_directory( &self, key: &DirectoryCacheKey, ) -> Option<Arc<AnalysisOutput>>
Get a cached directory analysis result if it exists.
Sourcepub fn put_directory(&self, key: DirectoryCacheKey, value: Arc<AnalysisOutput>)
pub fn put_directory(&self, key: DirectoryCacheKey, value: Arc<AnalysisOutput>)
Store a directory analysis result in the cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnalysisCache
impl RefUnwindSafe for AnalysisCache
impl Send for AnalysisCache
impl Sync for AnalysisCache
impl Unpin for AnalysisCache
impl UnsafeUnpin for AnalysisCache
impl UnwindSafe for AnalysisCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more